import python3.9-3.9.10-2.el9

This commit is contained in:
CentOS Sources 2022-03-01 08:08:31 -05:00 committed by Stepan Oksanichenko
parent 027856a21d
commit 65fe2eba09
7 changed files with 1224 additions and 167 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/Python-3.9.9.tar.xz
SOURCES/Python-3.9.10.tar.xz

View File

@ -1 +1 @@
6274e5631c520d75bf1f0a046640fd3996fe99f0 SOURCES/Python-3.9.9.tar.xz
936fc25ac4e1b482a0cefa82dd6092a0c6b575e6 SOURCES/Python-3.9.10.tar.xz

View File

@ -2,41 +2,61 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Michal Cyprian <m.cyprian@gmail.com>
Date: Mon, 26 Jun 2017 16:32:56 +0200
Subject: [PATCH] 00251: Change user install location
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Set values of prefix and exec_prefix in distutils install command
to /usr/local if executable is /usr/bin/python* and RPM build
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
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
---
Lib/distutils/command/install.py | 15 +++++++++++++--
Lib/distutils/command/install.py | 9 +++++++--
Lib/site.py | 9 ++++++++-
2 files changed, 21 insertions(+), 3 deletions(-)
Lib/sysconfig.py | 17 +++++++++++++++++
3 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index aaa300efa9..f8d453912a 100644
index aaa300efa9..18f01f10d4 100644
--- a/Lib/distutils/command/install.py
+++ b/Lib/distutils/command/install.py
@@ -419,8 +419,19 @@ class install(Command):
@@ -3,6 +3,7 @@
Implements the Distutils 'install' command."""
import sys
+import sysconfig
import os
from distutils import log
@@ -142,6 +143,8 @@ class install(Command):
negative_opt = {'no-compile' : 'compile'}
+ # Allow Fedora to add components to the prefix
+ _prefix_addition = getattr(sysconfig, '_prefix_addition', '')
def initialize_options(self):
"""Initializes options."""
@@ -419,8 +422,10 @@ class install(Command):
raise DistutilsOptionError(
"must not supply exec-prefix without prefix")
- self.prefix = os.path.normpath(sys.prefix)
- self.exec_prefix = os.path.normpath(sys.exec_prefix)
+ # self.prefix is set to sys.prefix + /local/
+ # if neither RPM build nor virtual environment is
+ # detected to make pip and distutils install packages
+ # into the separate location.
+ if (not (hasattr(sys, 'real_prefix') or
+ sys.prefix != sys.base_prefix) and
+ 'RPM_BUILD_ROOT' not in os.environ):
+ addition = "/local"
+ else:
+ addition = ""
+
+ self.prefix = os.path.normpath(sys.prefix) + addition
+ self.exec_prefix = os.path.normpath(sys.exec_prefix) + addition
+ self.prefix = (
+ os.path.normpath(sys.prefix) + self._prefix_addition)
+ self.exec_prefix = (
+ os.path.normpath(sys.exec_prefix) + self._prefix_addition)
else:
if self.exec_prefix is None:
@ -60,3 +80,31 @@ index 9e617afb00..db14f715f9 100644
for sitedir in getsitepackages(prefixes):
if os.path.isdir(sitedir):
addsitedir(sitedir, known_paths)
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index e3f79bfde5..e124104876 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -86,6 +86,23 @@ _INSTALL_SCHEMES = {
},
}
+# Force pip to use distutils paths instead of sysconfig
+# https://github.com/pypa/pip/issues/10647
+_PIP_USE_SYSCONFIG = False
+
+# This is used by distutils.command.install in the stdlib
+# as well as pypa/distutils (e.g. bundled in setuptools).
+# The self.prefix value is set to sys.prefix + /local/
+# if neither RPM build nor virtual environment is
+# detected to make distutils install packages
+# into the separate location.
+# https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
+if (not (hasattr(sys, 'real_prefix') or
+ sys.prefix != sys.base_prefix) and
+ 'RPM_BUILD_ROOT' not in os.environ):
+ _prefix_addition = "/local"
+
+
_SCHEME_KEYS = ('stdlib', 'platstdlib', 'purelib', 'platlib', 'include',
'scripts', 'data')

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAmHgts4ACgkQsmmV4xAl
BWiDfQ/6A6ALwx3xrU5ks0Fec91x56ixg+S91cMGDwHM78/KT+gOSva0FxLlpVDO
OD0yLoBOwVjSaiFAZC9wH2tf6xWLujVeBscrVX3Di1DZznZGgusDhP+gWpugULrF
WCr1ZLxnerhOMmBU9hSOx1ObBc91CIsagqafeMuAWoEwsQpkG0hDHuRN8QeJn79s
mFt4/X6/2NQEw/ucxftwoLIfqDbeP468wthOBgr9TrYfseSojnnYCxOiitC8k2GS
ieLq1RQu6ZjSYtHyL+mvXwTy2tEyc6v/3s+3lJCcM6uK+vyAvwP4QwIXwpjwHMDW
0YdyB812pWUleAt7P+BvVbumjGCs3hFHydMm6iA1eiONQk5Z0QQv0qrh+rqorXkJ
aUgjiXjbNkx93m+hftUXXEcKWm6hi8CikcajBPbTZt6PlOCL2ZbN5NclTDpG3JMK
8WHFpeFF1uaKcsDF5L9QU+ilXR0wxrh99DePQiLqsMvzbocB3cd5x8Ws1MNX/5tU
6p88qUf1Zdg3EA7VQD7m90cTOHcskH8o+Bw+Jd+uDo+H8Pg9Yz9yHik6rHe8OwiA
ol7eiEO07WePwqX4PqHozRtCVNSOZtrSSoWK2LNQdK9Z+EhVhQvDDk3hFQiE7ymM
ZXHYHATjmGFN7WSThMR/8IFgTSqpuird+RXEkVZKorYPsA0P55I=
=KRy4
-----END PGP SIGNATURE-----

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAmGSq04ACgkQsmmV4xAl
BWjtXQ/8CggiE692fd0jq3sVMNdAarUwWPWTVblm3H0zkwrpkrLAOTZfb+6UMini
XbXgFBIAERLffO5XHumJgXKR9pkJmYxQ5gjz+9YA5hBswQzj6x6nFqANYj3Jes7N
GUTohgVgmhfTW8EsJwE+bfRuJfpQaWDS1YHErjvfH+iywpJdagNGoHlxjoFFY4LQ
pOxO9fe6WqCCqGcGoniyRrGOpoyo59eMezVc9bCOeuvsEhOxcxAJq8bEMrphL0AJ
EOAsb5AZYsQFZhxbdN//f5CPMJ1eskqYN0ho1LGhL/z0JcRUDpAb4h5YQHcCgQN+
rNM6keTfFtNEa19ByW74f1fJJw/VgqBHNm6AVnvw9WOJvhlwSei0xeZHZtSL5VtH
WsJtZuhYqRWCrokjt2HOVD4b8vvAegaEqEPR+SFPBqJJbiHJ/LQTOv+fweQnyo+F
EXKof0ZXbax7Q/ADIVhd2y3C0hYrpzRKVEk1u643ns0V+wZ2VuilL/k5aB/LaOoy
Z9O2WoxSw0SMm0etegVyefT5+gj5l/8euXwKWqxKFPhue7pWngwzMPzjkMDcvfYb
4o21d9vbTFvGAHJ5SCqHPLy5iIf40pfLLZreEXtSMLM1mGMlfGnt270UasUIIxWE
TxHYHthQX0M2hMW77dc5hcVcRrUNKmf8P7XbnDjc61eSlRgTJaE=
=2zA6
-----END PGP SIGNATURE-----

View File

@ -13,7 +13,7 @@ URL: https://www.python.org/
# WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well
%global general_version %{pybasever}.9
%global general_version %{pybasever}.10
#global prerel ...
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
@ -328,7 +328,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
@ -336,7 +336,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
@ -363,8 +369,9 @@ Patch328: 00328-pyc-timestamp-invalidation-mode.patch
# - In FIPS mode, the blake2 hashes use OpenSSL wrappers
# and do not offer extended functionality (keys, tree hashing, custom digest size)
#
# - The patch, in its current state, is in a preliminary form to set the groundwork
# for refining Python's FIPS compatibility until OpenSSL is FIPS ready.
# - In FIPS mode, hmac.HMAC can only be instantiated with an OpenSSL wrapper
# or a string with OpenSSL hash name as the "digestmod" argument.
# The argument must be specified (instead of defaulting to md5).
Patch329: 00329-fips.patch
# 00353 # ab4cc97b643cfe99f567e3a03e5617b507183771
@ -768,6 +775,9 @@ version once Python %{pybasever} is stable.
%autopatch -M 188
%if %{with rpmwheels}
# Temporary workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1954999
%{?!apply_patch:%define apply_patch(qp:m:) {%__apply_patch %**}}
%apply_patch -q %{PATCH189}
rm Lib/ensurepip/_bundled/*.whl
%endif
@ -1790,6 +1800,19 @@ CheckPython optimized
# ======================================================
%changelog
* Wed Feb 09 2022 Charalampos Stratakis <cstratak@redhat.com> - 3.9.10-2
- Fix undefined behavior in Modules/_hashopenssl.c
Resolves: rhbz#1942527
* Mon Jan 17 2022 Charalampos Stratakis <cstratak@redhat.com> - 3.9.10-1
- Update to 3.9.10
- Support OpenSSL FIPS mode
Resolves: rhbz#1942527, rhbz#1835169
* 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
* Mon Nov 22 2021 Tomas Orsava <torsava@redhat.com> - 3.9.9-2
- Read pre-packaged Python wheels from a newly versioned directory
/usr/share/python3-wheels