15
0
forked from pool/python-json5

Accepting request 922604 from home:schubi2

- Use libalternatives instead of update-alternatives.

OBS-URL: https://build.opensuse.org/request/show/922604
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-json5?expand=0&rev=11
This commit is contained in:
2021-10-03 17:49:36 +00:00
committed by Git OBS Bridge
parent a574f01dc9
commit 3c2981636a
2 changed files with 21 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Oct 1 08:16:33 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Use libalternatives instead of update-alternatives.
-------------------------------------------------------------------
Tue Jun 22 08:52:38 UTC 2021 - Paolo Stivanin <info@paolostivanin.com>

View File

@@ -16,6 +16,13 @@
#
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-json5
Version: 0.9.6
@@ -28,10 +35,14 @@ Source: https://github.com/dpranke/pyjson5/archive/v%{version}.tar.gz#/p
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python-rpm-macros >= 20210929
Requires: python-setuptools
%if %{with libalternatives}
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
%endif
BuildArch: noarch
%python_subpackages
@@ -61,6 +72,10 @@ slightly more usable as a configuration language:
%check
%pytest
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative pyjson5
%post
%python_install_alternative pyjson5