forked from pool/python-jsonpatch
Accepting request 922605 from home:schubi2
- Use libalternatives instead of update-alternatives. OBS-URL: https://build.opensuse.org/request/show/922605 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonpatch?expand=0&rev=52
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 30 13:32:40 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||||
|
|
||||||
|
- Use libalternatives instead of update-alternatives.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Sep 17 21:02:26 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
Fri Sep 17 21:02:26 UTC 2021 - Matej Cepl <mcepl@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-%{**}}
|
||||||
Name: python-jsonpatch
|
Name: python-jsonpatch
|
||||||
Version: 1.32
|
Version: 1.32
|
||||||
@@ -28,9 +34,13 @@ Source: https://files.pythonhosted.org/packages/source/j/jsonpatch/jsonp
|
|||||||
BuildRequires: %{python_module jsonpointer >= 1.9}
|
BuildRequires: %{python_module jsonpointer >= 1.9}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros >= 20210929
|
||||||
|
%if %{with libalternatives}
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
Requires: python-jsonpointer >= 1.9
|
Requires: python-jsonpointer >= 1.9
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
|
%endif
|
||||||
Requires(preun):update-alternatives
|
Requires(preun):update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@@ -55,6 +65,10 @@ rm %{buildroot}%{_bindir}/jsondiff
|
|||||||
%check
|
%check
|
||||||
%pyunittest -v tests
|
%pyunittest -v tests
|
||||||
|
|
||||||
|
%pre
|
||||||
|
# If libalternatives is used: Removing old update-alternatives entries.
|
||||||
|
%python_libalternatives_reset_alternative jsonpatch
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative jsonpatch
|
%python_install_alternative jsonpatch
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user