Make python-pip-wheel compatible with Python 3.12.0a2+

Avoid importing distutils globally, backported from pip 22.3.
This commit is contained in:
Miro Hrončok 2022-11-16 01:03:03 +01:00
commit 7715939f2f
2 changed files with 273 additions and 1 deletions

View file

@ -21,7 +21,7 @@
Name: python-%{srcname}
Version: %{base_version}%{?prerel:~%{prerel}}
Release: 3%{?dist}
Release: 4%{?dist}
Summary: A tool for installing and managing Python packages
# We bundle a lot of libraries with pip, which itself is under MIT license.
@ -86,6 +86,15 @@ Patch5: nowarn-pip._internal.main.patch
# Upstream issue: https://github.com/pypa/packaging/issues/368
Patch6: no-version-warning.patch
# Avoid importing distutils globally
# This is needed to make the pip wheel usable with Python 3.12+
# Backported from pip 22.3
# https://github.com/pypa/pip/commit/0e06452530
# https://github.com/pypa/pip/commit/db47515958
# https://github.com/pypa/pip/commit/c520ccf75d
# https://github.com/pypa/pip/commit/8cbb89b6cc
Patch7: avoid-importing-distutils-globally.patch
# Downstream only patch
# Users might have local installations of pip from using
# `pip install --user --upgrade pip` on older/newer versions.
@ -400,6 +409,9 @@ pytest_k='not completion and
%{python_wheel_dir}/%{python_wheel_name}
%changelog
* Wed Nov 16 2022 Miro Hrončok <mhroncok@redhat.com> - 21.3.1-4
- Make python-pip-wheel compatible with Python 3.12.0a2+
* Tue Sep 06 2022 Miro Hrončok <mhroncok@redhat.com> - 21.3.1-3
- No longer use the rpm_install prefix to determine RPM-installed packages
- Related: rhbz#2026979