Update to 3.11.0a7, in bootstrap mode

This commit is contained in:
Tomáš Hrnčiar 2022-04-06 11:36:00 +02:00
parent 483c098fba
commit 113681a061
3 changed files with 29 additions and 24 deletions

View File

@ -28,9 +28,9 @@ Co-authored-by: Michal Cyprian <m.cyprian@gmail.com>
Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com>
---
Lib/site.py | 9 ++++++++-
Lib/sysconfig.py | 25 +++++++++++++++++++++++++
Lib/sysconfig.py | 19 +++++++++++++++++++
Lib/test/test_sysconfig.py | 4 +++-
3 files changed, 36 insertions(+), 2 deletions(-)
3 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/Lib/site.py b/Lib/site.py
index b11cd48e69..63ddd5b21b 100644
@ -54,22 +54,16 @@ index b11cd48e69..63ddd5b21b 100644
if os.path.isdir(sitedir):
addsitedir(sitedir, known_paths)
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index d4a8a68028..491f82de45 100644
index 2a01342eda..447bfff83f 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -58,6 +58,31 @@
},
}
@@ -103,6 +103,25 @@
else:
_INSTALL_SCHEMES['venv'] = _INSTALL_SCHEMES['posix_venv']
+# backup the original posix_prefix as rpm_prefix
+# RPM packages use it and we need to be able to read it even when changed
+_INSTALL_SCHEMES['rpm_prefix'] = _INSTALL_SCHEMES['posix_prefix']
+# Virtualenv >= 20.10.0 favors the "venv" scheme over the defaults when creating virtual environments.
+# See: https://github.com/pypa/virtualenv/commit/8da79db86d8a5c74d03667a40e64ff832076445e
+# See: https://bugs.python.org/issue45413
+# "venv" should be the same as the unpatched posix_prefix for us,
+# so new virtual environments aren't created with paths like venv/local/bin/python.
+_INSTALL_SCHEMES['venv'] = _INSTALL_SCHEMES['posix_prefix']
+
+if (not (hasattr(sys, 'real_prefix') or
+ sys.prefix != sys.base_prefix) and
@ -90,19 +84,19 @@ index d4a8a68028..491f82de45 100644
# NOTE: site.py has copy of this function.
# Sync it when modify this function.
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 2c4120979d..3a2901b0bf 100644
index c7ec78fa4d..e47139df1f 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -267,7 +267,7 @@ def test_get_config_h_filename(self):
@@ -333,7 +333,7 @@ def test_get_config_h_filename(self):
self.assertTrue(os.path.isfile(config_h), config_h)
def test_get_scheme_names(self):
- wanted = ['nt', 'posix_home', 'posix_prefix']
+ wanted = ['nt', 'posix_home', 'posix_prefix', 'rpm_prefix', 'venv']
- wanted = ['nt', 'posix_home', 'posix_prefix', 'posix_venv', 'nt_venv', 'venv']
+ wanted = ['nt', 'posix_home', 'posix_prefix', 'posix_venv', 'nt_venv', 'venv', 'rpm_prefix']
if HAS_USER_BASE:
wanted.extend(['nt_user', 'osx_framework_user', 'posix_user'])
self.assertEqual(get_scheme_names(), tuple(sorted(wanted)))
@@ -279,6 +279,8 @@ def test_symlink(self): # Issue 7880
@@ -345,6 +345,8 @@ def test_symlink(self): # Issue 7880
cmd = "-c", "import sysconfig; print(sysconfig.get_platform())"
self.assertEqual(py.call_real(*cmd), py.call_link(*cmd))

View File

@ -14,10 +14,10 @@ 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}.0
%global prerel a6
%global prerel a7
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
Release: 2%{?dist}
Release: 1%{?dist}
License: Python
@ -60,7 +60,7 @@ License: Python
# IMPORTANT: When bootstrapping, it's very likely the wheels for pip and
# setuptools are not available. Turn off the rpmwheels bcond until
# the two packages are built with wheels to get around the issue.
%bcond_with bootstrap
%bcond_without bootstrap
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
# Uses upstream bundled prebuilt wheels otherwise
@ -68,7 +68,7 @@ License: Python
# If the rpmwheels condition is disabled, we use the bundled wheel packages
# from Python with the versions below.
# This needs to be manually updated when we update Python.
%global pip_version 21.2.4
%global pip_version 22.0.4
%global setuptools_version 58.1.0
# Expensive optimizations (mainly, profile-guided optimizations)
@ -267,7 +267,7 @@ Source11: idle3.appdata.xml
# Was Patch0 in ivazquez' python3000 specfile
Patch1: 00001-rpath.patch
# 00251 # 531494a5ded29dad59f617304dab4eb8b7f80b0b
# 00251 # 178b2099a8eb7c487f1a32c3f055be6c154c0116
# Change user install location
#
# Change the values of sysconfig's "posix_prefix" install scheme to /usr/local
@ -1323,11 +1323,19 @@ CheckPython optimized
%{pylibdir}/logging
%{pylibdir}/multiprocessing
%dir %{pylibdir}/re/
%{pylibdir}/re/*.py
%{pylibdir}/re/__pycache__/*%{bytecode_suffixes}
%dir %{pylibdir}/sqlite3/
%dir %{pylibdir}/sqlite3/__pycache__/
%{pylibdir}/sqlite3/*.py
%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes}
%dir %{pylibdir}/tomllib/
%{pylibdir}/tomllib/*.py
%{pylibdir}/tomllib/__pycache__/*%{bytecode_suffixes}
%if %{without flatpackage}
%exclude %{pylibdir}/turtle.py
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
@ -1609,6 +1617,9 @@ CheckPython optimized
# ======================================================
%changelog
* Wed Apr 06 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.11.0~a7-1
- Update to 3.11.0a7
* Tue Mar 08 2022 Miro Hrončok <mhroncok@redhat.com> - 3.11.0~a6-2
- Finish bootstrapping 3.11.0a6

View File

@ -1,2 +1,2 @@
SHA512 (Python-3.11.0a6.tar.xz) = 867f7aabe10977ccf31bcfd6968fd8bb880cf5c3671bb70364a9b37296dae7ab017624446c64c12f7753b59c1ebda9e494bed5f946c5586b54fd86b0289d04ea
SHA512 (Python-3.11.0a6.tar.xz.asc) = c29bef3fa59ef304f420a18657fe3448211e4f742cc119937335aaad36b9898d965d84fc6ea8a2f9f27865e237cc929b9843663292c44dd7b3ae329aa3fab1e9
SHA512 (Python-3.11.0a7.tar.xz) = f193ff9dedece16a428db129f4aac9ee2ad5f73a7f7eda2063ed58bfe230a4bfef067fe6c03e2b26d01be1d3205cee8778489ea6543b74a9d2a1f415739a63ba
SHA512 (Python-3.11.0a7.tar.xz.asc) = eae66913e3a5efe70a0c3639537e5b19cd66175a61f6e8b46b194411e27df2ea3f6a8154ed05c5905f511815f011e80c5b06b3a836ea8749cb9825f85223ecc2