diff --git a/python-pip.spec b/python-pip.spec index 5beca9a..1817621 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -214,10 +214,8 @@ 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 +# The python3.11 version that stopped using the rpm_prefix scheme +Requires: python3-libs >= 3.11.0~rc1-2 %{crypt_compat_recommends 3} @@ -408,9 +406,11 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog -* Mon Sep 05 2022 Charalampos Stratakis - 22.2.2-2 +* Mon Sep 05 2022 Python Maint - 22.2.2-2 - Fix crash when an empty dist-info/egg-info is present Resolves: rhbz#2115001 +- No longer use the rpm_install prefix to determine RPM-installed packages +Related: rhbz#2026979 * Wed Aug 03 2022 Charalampos Stratakis - 22.2.2-1 - Update to 22.2.2 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index d4497fd..3a9ea25 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -100,8 +100,8 @@ index a4c24b5..e7e2da9 100644 + # Prevent uninstalling packages from /usr + try: + if dist.installed_location in ( -+ sysconfig.get_path('purelib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), -+ sysconfig.get_path('platlib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), ++ sysconfig.get_path('purelib', scheme='posix_prefix', vars={'base': sys.base_prefix}), ++ sysconfig.get_path('platlib', scheme='posix_prefix', vars={'platbase': sys.base_prefix}), + ): + return None + except KeyError: # this Python doesn't have 'rpm_prefix' scheme yet