Sync patch 251 with Python 3.10+ on Fedora < 36

Instruct pip to use distutils
-----------------------------

The current version of pip uses distutils on Python < 3.10,
so this should change nothing,
but future versions of pip may theoretically change that.

Instruct pypa/distutils to add /local/ addition to prefix
---------------------------------------------------------

Needed for setuptools 60+ installed/upgraded by pip or when we update it in rawhide.
Setuptools 60+ uses bundled pypa/distutils instead of the standard library distutils.
This commit is contained in:
Miro Hrončok 2022-01-04 12:55:59 +01:00
commit 250d7d5d30
2 changed files with 79 additions and 21 deletions

View file

@ -17,7 +17,7 @@ URL: https://www.python.org/
#global prerel ...
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
Release: 3%{?dist}
Release: 4%{?dist}
License: Python
@ -320,7 +320,7 @@ Patch189: 00189-use-rpm-wheels.patch
%global pip_version 21.2.4
%global setuptools_version 58.1.0
# 00251 # 2eabd04356402d488060bc8fe316ad13fc8a3356
# 00251 # 1b1047c14ff98eae6d355b4aac4df3e388813f62
# Change user install location
#
# Set values of prefix and exec_prefix in distutils install command
@ -328,7 +328,13 @@ Patch189: 00189-use-rpm-wheels.patch
# is not detected to make pip and distutils install into separate location.
#
# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
# Downstream only: Awaiting resources to work on upstream PEP
# Downstream only: Reworked in Fedora 36+/Python 3.10+ to follow https://bugs.python.org/issue43976
#
# pypa/distutils integration: https://github.com/pypa/distutils/pull/70
#
# Also set sysconfig._PIP_USE_SYSCONFIG = False, to force pip-upgraded-pip
# to respect this patched distutils install command.
# See https://bugzilla.redhat.com/show_bug.cgi?id=2014513
Patch251: 00251-change-user-install-location.patch
# 00328 # 367fdcb5a075f083aea83ac174999272a8faf75c
@ -1794,6 +1800,10 @@ CheckPython optimized
# ======================================================
%changelog
* Sat Jan 08 2022 Miro Hrončok <mhroncok@redhat.com> - 3.9.9-4
- Instruct pip to use distutils
- Instruct pypa/distutils to add /local/ addition to prefix
* Sat Jan 08 2022 Miro Hrončok <mhroncok@redhat.com> - 3.9.9-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34