Detect paths not to uninstall from via sysconfig's rpm_prefix install scheme

This commit is contained in:
Miro Hrončok 2021-09-23 14:56:56 +02:00
commit 8b7935f5a8
2 changed files with 29 additions and 13 deletions

View file

@ -22,7 +22,7 @@
Name: python-%{srcname}
Version: %{base_version}%{?prerel:~%{prerel}}
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A tool for installing and managing Python packages
# We bundle a lot of libraries with pip, which itself is under MIT license.
@ -70,6 +70,7 @@ BuildRequires: python-wheel-wheel
# Prevent removing of the system packages installed under /usr/lib
# when pip install -U is executed.
# https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24
# Could be replaced with https://www.python.org/dev/peps/pep-0668/
Patch3: remove-existing-dist-only-if-path-conflicts.patch
# Use the system level root certificate instead of the one bundled in certifi
@ -203,6 +204,12 @@ Recommends: python%{python3_pkgversion}-setuptools
Provides: pip = %{version}-%{release}
Conflicts: python-pip < %{version}-%{release}
# The python3.10 version that added the rpm_prefix sysconfig install scheme
# This pip can also function with the previous version,
# but it would remove RPM-installed packages during sudo pip install --upgrade.
Requires: python3-libs >= 3.10.0-2
%{crypt_compat_recommends 3}
%description -n python%{python3_pkgversion}-%{srcname}
@ -391,6 +398,9 @@ pytest_k='not completion and
%{python_wheeldir}/%{python_wheelname}
%changelog
* Thu Sep 23 2021 Miro Hrončok <mhroncok@redhat.com> - 21.2.3-3
- Detect paths not to uninstall from via sysconfig's rpm_prefix install scheme
* Mon Aug 16 2021 Miro Hrončok <mhroncok@redhat.com> - 21.2.3-2
- Fix broken uninstallation by a bogus downstream patch