forked from pool/python-pip
Accepting request 923310 from home:schubi2
- Use libalternatives instead of update-alternatives. OBS-URL: https://build.opensuse.org/request/show/923310 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=91
This commit is contained in:
parent
5bae5d22f5
commit
24643ed603
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 8 16:07:38 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||||
|
|
||||||
|
- Use libalternatives instead of update-alternatives.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 4 08:43:14 UTC 2021 - Paolo Stivanin <info@paolostivanin.com>
|
Mon Jan 4 08:43:14 UTC 2021 - Paolo Stivanin <info@paolostivanin.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-%{**}}
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%if "%{flavor}" == "test"
|
%if "%{flavor}" == "test"
|
||||||
@ -47,13 +53,18 @@ Patch0: pip-shipped-requests-cabundle.patch
|
|||||||
Patch1: remove_mock.patch
|
Patch1: remove_mock.patch
|
||||||
BuildRequires: %{python_module setuptools >= 40.8.0}
|
BuildRequires: %{python_module setuptools >= 40.8.0}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros >= 20210929
|
||||||
Requires: ca-certificates
|
Requires: ca-certificates
|
||||||
Requires: coreutils
|
Requires: coreutils
|
||||||
Requires: python-setuptools
|
Requires: python-setuptools
|
||||||
Requires: python-xml
|
Requires: python-xml
|
||||||
|
%if %{with libalternatives}
|
||||||
|
Requires: alts
|
||||||
|
BuildRequires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
Recommends: ca-certificates-mozilla
|
Recommends: ca-certificates-mozilla
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
@ -146,6 +157,8 @@ donttest+=" or test_from_link_vcs_without_source_dir"
|
|||||||
# of the old binary resulting from the non-update-alternatives-ified package:
|
# of the old binary resulting from the non-update-alternatives-ified package:
|
||||||
[ -h %{_bindir}/pip ] || rm -f %{_bindir}/pip
|
[ -h %{_bindir}/pip ] || rm -f %{_bindir}/pip
|
||||||
[ -h %{_bindir}/pip3 ] || rm -f %{_bindir}/pip3
|
[ -h %{_bindir}/pip3 ] || rm -f %{_bindir}/pip3
|
||||||
|
# If libalternatives is used: Removing old update-alternatives entries.
|
||||||
|
%python_libalternatives_reset_alternative pip
|
||||||
|
|
||||||
%if !%{with test} && !%{with wheel}
|
%if !%{with test} && !%{with wheel}
|
||||||
%post
|
%post
|
||||||
|
Loading…
Reference in New Issue
Block a user