No longer use the rpm_install prefix to determine RPM-installed packages
In https://src.fedoraproject.org/rpms/python3.11/c/d75ca77a64 the rpm_prefix scheme stopped being interesting. Instead, we make sure to properly set both {base} and {platbase} variables which was subtly wrong before.
This commit is contained in:
parent
ca7bb6bb48
commit
a2dfa8738e
@ -214,10 +214,8 @@ Recommends: python%{python3_pkgversion}-setuptools
|
|||||||
Provides: pip = %{version}-%{release}
|
Provides: pip = %{version}-%{release}
|
||||||
Conflicts: python-pip < %{version}-%{release}
|
Conflicts: python-pip < %{version}-%{release}
|
||||||
|
|
||||||
# The python3.10 version that added the rpm_prefix sysconfig install scheme
|
# The python3.11 version that stopped using the rpm_prefix scheme
|
||||||
# This pip can also function with the previous version,
|
Requires: python3-libs >= 3.11.0~rc1-2
|
||||||
# but it would remove RPM-installed packages during sudo pip install --upgrade.
|
|
||||||
Requires: python3-libs >= 3.10.0-2
|
|
||||||
|
|
||||||
|
|
||||||
%{crypt_compat_recommends 3}
|
%{crypt_compat_recommends 3}
|
||||||
@ -408,9 +406,11 @@ pytest_k='not completion and
|
|||||||
%{python_wheel_dir}/%{python_wheel_name}
|
%{python_wheel_dir}/%{python_wheel_name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Sep 05 2022 Charalampos Stratakis <cstratak@redhat.com> - 22.2.2-2
|
* Mon Sep 05 2022 Python Maint <python-maint@redhat.com> - 22.2.2-2
|
||||||
- Fix crash when an empty dist-info/egg-info is present
|
- Fix crash when an empty dist-info/egg-info is present
|
||||||
Resolves: rhbz#2115001
|
Resolves: rhbz#2115001
|
||||||
|
- No longer use the rpm_install prefix to determine RPM-installed packages
|
||||||
|
Related: rhbz#2026979
|
||||||
|
|
||||||
* Wed Aug 03 2022 Charalampos Stratakis <cstratak@redhat.com> - 22.2.2-1
|
* Wed Aug 03 2022 Charalampos Stratakis <cstratak@redhat.com> - 22.2.2-1
|
||||||
- Update to 22.2.2
|
- Update to 22.2.2
|
||||||
|
@ -100,8 +100,8 @@ index a4c24b5..e7e2da9 100644
|
|||||||
+ # Prevent uninstalling packages from /usr
|
+ # Prevent uninstalling packages from /usr
|
||||||
+ try:
|
+ try:
|
||||||
+ if dist.installed_location in (
|
+ if dist.installed_location in (
|
||||||
+ sysconfig.get_path('purelib', 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='rpm_prefix', vars={'base': sys.base_prefix}),
|
+ sysconfig.get_path('platlib', scheme='posix_prefix', vars={'platbase': sys.base_prefix}),
|
||||||
+ ):
|
+ ):
|
||||||
+ return None
|
+ return None
|
||||||
+ except KeyError: # this Python doesn't have 'rpm_prefix' scheme yet
|
+ except KeyError: # this Python doesn't have 'rpm_prefix' scheme yet
|
||||||
|
Loading…
Reference in New Issue
Block a user