Accepting request 923262 from home:schubi2

- Use libalternatives instead of update-alternatives.

OBS-URL: https://build.opensuse.org/request/show/923262
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonpointer?expand=0&rev=30
This commit is contained in:
Dirk Mueller 2021-11-06 10:27:39 +00:00 committed by Git OBS Bridge
parent 3b65a894b3
commit ad87855b2b
2 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Aug 22 20:52:50 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Use libalternatives instead of update-alternatives.
-------------------------------------------------------------------
Mon Mar 15 08:57:07 UTC 2021 - Dirk Müller <dmueller@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-%{**}}
Name: python-jsonpointer
Version: 2.1
@ -27,9 +33,14 @@ URL: https://github.com/stefankoegl/python-json-pointer
Source: https://files.pythonhosted.org/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python-rpm-macros >= 20210929
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
%else
Requires(post): update-alternatives
Requires(preun): update-alternatives
%endif
BuildArch: noarch
%python_subpackages
@ -50,6 +61,10 @@ A module to identify specific nodes in a JSON document (according to draft 08).
%check
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python tests.py
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative jsonpointer
%post
%python_install_alternative jsonpointer