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:
Dirk Mueller 2021-11-06 10:35:34 +00:00 committed by Git OBS Bridge
parent c1a1849ade
commit ab23a4b796
2 changed files with 21 additions and 1 deletions

View File

@ -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

View File

@ -16,6 +16,12 @@
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-jsonschema
@ -40,13 +46,18 @@ BuildRequires: %{python_module six >= 1.11.0}
BuildRequires: %{python_module strict-rfc3339}
BuildRequires: %{python_module webcolors}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python-rpm-macros >= 20210929
Requires: python-attrs >= 17.4.0
Requires: python-importlib-metadata
Requires: python-pyrsistent >= 0.14.0
Requires: python-six >= 1.11.0
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
%else
Requires(post): update-alternatives
Requires(preun):update-alternatives
%endif
BuildArch: noarch
%python_subpackages
@ -74,6 +85,10 @@ for Python (supporting 2.6+ including Python 3).
%check
%pytest jsonschema/tests
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative jsonschema
%post
%python_install_alternative jsonschema