Accepting request 1045367 from home:bnavigator:branches:devel:languages:python
- Create subpackages for [format] and [format-nongpl] extras * required by the tests for python-jupyter-server - Test in _multibuild in order to check that the rpm requirements are set correctly OBS-URL: https://build.opensuse.org/request/show/1045367 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonschema?expand=0&rev=59
This commit is contained in:
parent
1ecd20fd71
commit
af583d06c5
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 26 11:13:34 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Create subpackages for [format] and [format-nongpl] extras
|
||||||
|
* required by the tests for python-jupyter-server
|
||||||
|
- Test in _multibuild in order to check that the rpm requirements
|
||||||
|
are set correctly
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Nov 30 13:41:12 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
|
Wed Nov 30 13:41:12 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-jsonschema
|
# spec file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
@ -16,49 +16,42 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version} > 1500
|
%if 0%{?suse_version} > 1500
|
||||||
%bcond_without libalternatives
|
%bcond_without libalternatives
|
||||||
%else
|
%else
|
||||||
%bcond_with libalternatives
|
%bcond_with libalternatives
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: python-jsonschema
|
Name: python-jsonschema%{psuffix}
|
||||||
Version: 4.17.3
|
Version: 4.17.3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: An implementation of JSON-Schema validation for Python
|
Summary: An implementation of JSON-Schema validation for Python
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/python-jsonschema/jsonschema
|
URL: https://github.com/python-jsonschema/jsonschema
|
||||||
Source: https://files.pythonhosted.org/packages/source/j/jsonschema/jsonschema-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/j/jsonschema/jsonschema-%{version}.tar.gz
|
||||||
# SECTION build
|
|
||||||
BuildRequires: %{python_module base >= 3.7}
|
BuildRequires: %{python_module base >= 3.7}
|
||||||
BuildRequires: %{python_module hatch-fancy-pypi-readme}
|
BuildRequires: %{python_module hatch-fancy-pypi-readme}
|
||||||
BuildRequires: %{python_module hatch_vcs}
|
BuildRequires: %{python_module hatch_vcs}
|
||||||
BuildRequires: %{python_module hatchling}
|
BuildRequires: %{python_module hatchling}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
# /SECTION
|
|
||||||
# SECTION runtime
|
|
||||||
BuildRequires: %{python_module attrs >= 17.4.0}
|
|
||||||
BuildRequires: %{python_module importlib-metadata if %python-base < 3.8}
|
|
||||||
BuildRequires: %{python_module importlib-resources >= 1.4.0 if %python-base < 3.9}
|
|
||||||
BuildRequires: %{python_module pkgutil-resolve-name if %python-base < 3.9}
|
|
||||||
BuildRequires: %{python_module pyrsistent >= 0.14.0}
|
|
||||||
BuildRequires: %{python_module typing-extensions if %python-base < 3.8}
|
|
||||||
# SECTION test
|
|
||||||
BuildRequires: %{python_module Twisted}
|
|
||||||
BuildRequires: git-core
|
|
||||||
# /SECTION
|
|
||||||
# SECTION extras (if available)
|
|
||||||
#BuildRequires: %%{python_module fqdn}
|
|
||||||
BuildRequires: %{python_module idna}
|
|
||||||
#BuildRequires: %%{python_module isoduration}
|
|
||||||
BuildRequires: %{python_module jsonpointer > 1.13}
|
|
||||||
#BuildRequires: %%{python_module rfc3339-validator}
|
|
||||||
BuildRequires: %{python_module rfc3987}
|
|
||||||
#BuildRequires: %%{python_module uri_template}
|
|
||||||
BuildRequires: %{python_module webcolors >= 1.11}
|
|
||||||
# /SECTION
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros >= 20210929
|
BuildRequires: python-rpm-macros >= 20210929
|
||||||
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module Twisted}
|
||||||
|
BuildRequires: %{python_module jsonschema = %{version}}
|
||||||
|
BuildRequires: %{python_module jsonschema-format = %{version}}
|
||||||
|
BuildRequires: %{python_module jsonschema-format-nongpl = %{version}}
|
||||||
|
BuildRequires: git-core
|
||||||
|
%endif
|
||||||
Requires: python-attrs >= 17.4.0
|
Requires: python-attrs >= 17.4.0
|
||||||
Requires: python-pyrsistent >= 0.14.0
|
Requires: python-pyrsistent >= 0.14.0
|
||||||
%if 0%{python_version_nodots} < 38
|
%if 0%{python_version_nodots} < 38
|
||||||
@ -85,9 +78,44 @@ The validator can be used as python module and from console:
|
|||||||
|
|
||||||
$ jsonschema --instance sample.json sample.schema
|
$ jsonschema --instance sample.json sample.schema
|
||||||
|
|
||||||
|
%package format
|
||||||
|
Summary: An implementation of JSON-Schema validation for Python [format] extra
|
||||||
|
Requires: python-fqdn
|
||||||
|
Requires: python-idna
|
||||||
|
Requires: python-isoduration
|
||||||
|
Requires: python-jsonpointer > 1.13
|
||||||
|
Requires: python-jsonschema = %{version}
|
||||||
|
Requires: python-rfc3339-validator
|
||||||
|
Requires: python-rfc3987
|
||||||
|
Requires: python-uri_template
|
||||||
|
Requires: python-webcolors >= 1.11
|
||||||
|
|
||||||
|
%description format
|
||||||
|
jsonschema is an implementation of the JSON Schema specification for Python.
|
||||||
|
|
||||||
|
This subpackage provides the [format] extra
|
||||||
|
|
||||||
|
%package format-nongpl
|
||||||
|
Summary: An implementation of JSON-Schema validation for Python [format-nongpl] extra
|
||||||
|
Requires: python-fqdn
|
||||||
|
Requires: python-idna
|
||||||
|
Requires: python-isoduration
|
||||||
|
Requires: python-jsonpointer > 1.13
|
||||||
|
Requires: python-jsonschema = %{version}
|
||||||
|
Requires: python-rfc3339-validator
|
||||||
|
Requires: python-rfc3986-validator > 0.1.0
|
||||||
|
Requires: python-uri_template
|
||||||
|
Requires: python-webcolors >= 1.11
|
||||||
|
|
||||||
|
%description format-nongpl
|
||||||
|
jsonschema is an implementation of the JSON Schema specification for Python.
|
||||||
|
|
||||||
|
This subpackage provides the [format-nongpl] extra
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n jsonschema-%{version}
|
%setup -q -n jsonschema-%{version}
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
|
||||||
@ -98,15 +126,18 @@ The validator can be used as python module and from console:
|
|||||||
%fdupes %{buildroot}%{$python_sitelib}
|
%fdupes %{buildroot}%{$python_sitelib}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prepare for update-alternatives usage
|
# Prepare for libalternatives/update-alternatives usage
|
||||||
%python_clone -a %{buildroot}%{_bindir}/jsonschema
|
%python_clone -a %{buildroot}%{_bindir}/jsonschema
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
export JSON_SCHEMA_TEST_SUITE=$PWD/json
|
export JSON_SCHEMA_TEST_SUITE=$PWD/json
|
||||||
%{python_expand # see tox.ini
|
%{python_expand # see tox.ini
|
||||||
export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
||||||
$python -B -m twisted.trial jsonschema
|
$python -B -m twisted.trial jsonschema
|
||||||
}
|
}
|
||||||
|
%endif
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
# If libalternatives is used: Removing old update-alternatives entries.
|
# If libalternatives is used: Removing old update-alternatives entries.
|
||||||
@ -118,6 +149,7 @@ $python -B -m twisted.trial jsonschema
|
|||||||
%preun
|
%preun
|
||||||
%python_uninstall_alternative jsonschema
|
%python_uninstall_alternative jsonschema
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
@ -125,4 +157,11 @@ $python -B -m twisted.trial jsonschema
|
|||||||
%{python_sitelib}/jsonschema
|
%{python_sitelib}/jsonschema
|
||||||
%{python_sitelib}/jsonschema-%{version}*-info
|
%{python_sitelib}/jsonschema-%{version}*-info
|
||||||
|
|
||||||
|
%files %{python_files format}
|
||||||
|
%license COPYING
|
||||||
|
|
||||||
|
%files %{python_files format-nongpl}
|
||||||
|
%license COPYING
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user