forked from pool/python-jsonschema
Accepting request 923263 from home:schubi2
- Use libalternatives instead of update-alternatives. OBS-URL: https://build.opensuse.org/request/show/923263 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonschema?expand=0&rev=48
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Aug 22 21:08:31 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||||
|
|
||||||
|
- Use libalternatives instead of update-alternatives.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue May 25 07:59:29 UTC 2021 - pgajdos@suse.com
|
Tue May 25 07:59:29 UTC 2021 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@@ -16,6 +16,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-jsonschema
|
Name: python-jsonschema
|
||||||
@@ -40,13 +46,18 @@ BuildRequires: %{python_module six >= 1.11.0}
|
|||||||
BuildRequires: %{python_module strict-rfc3339}
|
BuildRequires: %{python_module strict-rfc3339}
|
||||||
BuildRequires: %{python_module webcolors}
|
BuildRequires: %{python_module webcolors}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros >= 20210929
|
||||||
Requires: python-attrs >= 17.4.0
|
Requires: python-attrs >= 17.4.0
|
||||||
Requires: python-importlib-metadata
|
Requires: python-importlib-metadata
|
||||||
Requires: python-pyrsistent >= 0.14.0
|
Requires: python-pyrsistent >= 0.14.0
|
||||||
Requires: python-six >= 1.11.0
|
Requires: python-six >= 1.11.0
|
||||||
|
%if %{with libalternatives}
|
||||||
|
Requires: alts
|
||||||
|
BuildRequires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun):update-alternatives
|
||||||
|
%endif
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@@ -74,6 +85,10 @@ for Python (supporting 2.6+ including Python 3).
|
|||||||
%check
|
%check
|
||||||
%pytest jsonschema/tests
|
%pytest jsonschema/tests
|
||||||
|
|
||||||
|
%pre
|
||||||
|
# If libalternatives is used: Removing old update-alternatives entries.
|
||||||
|
%python_libalternatives_reset_alternative jsonschema
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative jsonschema
|
%python_install_alternative jsonschema
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user