From b180b3028c856ca11d1c6a9b578da196cb46d95b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 20 Nov 2019 10:35:05 +0100 Subject: [PATCH] Rebased to Python 3.9.0a1 Actually rebased patches: 102, 189 New patches at https://github.com/fedora-python/cpython/tree/fedora-3.9 --- 00001-rpath.patch | 4 +- 00102-lib64.patch | 58 ++++++++++----------- 00111-no-static-lib.patch | 8 +-- 00189-use-rpm-wheels.patch | 24 ++++----- 00251-change-user-install-location.patch | 4 +- 00274-fix-arch-names.patch | 6 +-- 00328-pyc-timestamp-invalidation-mode.patch | 4 +- python38.rpmlintrc => python39.rpmlintrc | 0 python38.spec => python39.spec | 9 ++-- sources | 4 +- tests/tests.yml | 6 +-- 11 files changed, 64 insertions(+), 63 deletions(-) rename python38.rpmlintrc => python39.rpmlintrc (100%) rename python38.spec => python39.spec (99%) diff --git a/00001-rpath.patch b/00001-rpath.patch index d9dd3ce..e2809a5 100644 --- a/00001-rpath.patch +++ b/00001-rpath.patch @@ -1,4 +1,4 @@ -From 8ecb6d320c03242ca94bf2e99d9d80510d5011e1 Mon Sep 17 00:00:00 2001 +From dd253c4f803a5dfa2ba7dfdb01b722e47c2b02e8 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 13 Jan 2010 21:25:18 +0000 Subject: [PATCH] 00001: Fixup distutils/unixccompiler.py to remove standard @@ -29,5 +29,5 @@ index d10a78da31..4df4b67810 100644 include_dirs=None, extra_preargs=None, extra_postargs=None): fixed_args = self._fix_compile_args(None, macros, include_dirs) -- -2.21.0 +2.23.0 diff --git a/00102-lib64.patch b/00102-lib64.patch index f1f0c8d..0a9db42 100644 --- a/00102-lib64.patch +++ b/00102-lib64.patch @@ -1,4 +1,4 @@ -From b9f1dd6be195cc3b11a80e6f0dde2096dd8b9855 Mon Sep 17 00:00:00 2001 +From 25fcefdafb47ee30f4dc802742f49e501d7b2f37 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 13 Jan 2010 21:25:18 +0000 Subject: [PATCH] 00102: Change the various install paths to use /usr/lib64/ @@ -154,7 +154,7 @@ index 41c4229919..543c88432a 100644 'site-packages') self.assertEqual(dirs[0], wanted) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 502317aa0c..4ad3df1122 100644 +index d08c78df39..4d2f68447d 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -143,7 +143,7 @@ LIBDIR= @libdir@ @@ -167,41 +167,41 @@ index 502317aa0c..4ad3df1122 100644 # Detailed destination directories diff --git a/Modules/getpath.c b/Modules/getpath.c -index b727f66953..a0c5fb6139 100644 +index 8632d1fe6d..09a818609e 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c -@@ -730,7 +730,7 @@ calculate_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig, - if (safe_wcscpy(exec_prefix, calculate->exec_prefix, exec_prefix_len) < 0) { - return PATHLEN_ERR(); +@@ -810,7 +810,7 @@ calculate_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig) } -- status = joinpath(exec_prefix, L"lib/lib-dynload", exec_prefix_len); -+ status = joinpath(exec_prefix, L"lib64/lib-dynload", exec_prefix_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -1067,7 +1067,7 @@ calculate_zip_path(PyCalculatePath *calculate, const wchar_t *prefix, - return PATHLEN_ERR(); + + calculate->exec_prefix = joinpath2(calculate->exec_prefix_macro, +- L"lib/lib-dynload"); ++ L"lib64/lib-dynload"); + if (calculate->exec_prefix == NULL) { + return _PyStatus_NO_MEMORY(); } +@@ -1284,7 +1284,7 @@ calculate_read_pyenv(PyCalculatePath *calculate) + static PyStatus + calculate_zip_path(PyCalculatePath *calculate) + { +- const wchar_t *lib_python = L"lib/python00.zip"; ++ const wchar_t *lib_python = L"lib64/python00.zip"; + + if (calculate->prefix_found > 0) { + /* Use the reduced prefix returned by Py_GetPrefix() +@@ -1435,7 +1435,7 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config) + return DECODE_LOCALE_ERR("VPATH macro", len); } -- status = joinpath(zip_path, L"lib/python00.zip", zip_path_len); -+ status = joinpath(zip_path, L"lib64/python00.zip", zip_path_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -1197,7 +1197,7 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config) - if (!calculate->exec_prefix) { - return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); - } + - calculate->lib_python = Py_DecodeLocale("lib/python" VERSION, &len); + calculate->lib_python = Py_DecodeLocale("lib64/python" VERSION, &len); if (!calculate->lib_python) { - return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); + return DECODE_LOCALE_ERR("EXEC_PREFIX macro", len); } diff --git a/configure b/configure -index 2a933cdbeb..bec365124e 100755 +index 44f14c3c2c..020531594c 100755 --- a/configure +++ b/configure -@@ -15182,9 +15182,9 @@ fi +@@ -15192,9 +15192,9 @@ fi if test x$PLATFORM_TRIPLET = x; then @@ -214,10 +214,10 @@ index 2a933cdbeb..bec365124e 100755 diff --git a/configure.ac b/configure.ac -index a189d42c2c..154a0aa5cc 100644 +index 0b28dda44c..4fca719c71 100644 --- a/configure.ac +++ b/configure.ac -@@ -4668,9 +4668,9 @@ fi +@@ -4679,9 +4679,9 @@ fi dnl define LIBPL after ABIFLAGS and LDVERSION is defined. AC_SUBST(PY_ENABLE_SHARED) if test x$PLATFORM_TRIPLET = x; then @@ -230,7 +230,7 @@ index a189d42c2c..154a0aa5cc 100644 AC_SUBST(LIBPL) diff --git a/setup.py b/setup.py -index 20d7f35652..024a1035c0 100644 +index 02f523c42d..559498d14b 100644 --- a/setup.py +++ b/setup.py @@ -649,7 +649,7 @@ class PyBuildExt(build_ext): @@ -257,5 +257,5 @@ index 20d7f35652..024a1035c0 100644 libraries=readline_libs)) else: -- -2.21.0 +2.23.0 diff --git a/00111-no-static-lib.patch b/00111-no-static-lib.patch index 361af70..784a281 100644 --- a/00111-no-static-lib.patch +++ b/00111-no-static-lib.patch @@ -1,4 +1,4 @@ -From f6df02cde47874f10e183ead483c90941bb8076f Mon Sep 17 00:00:00 2001 +From 796f2a2d1f213e963768e7c987fb49f8c4f47dfa Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 18 Jan 2010 17:59:07 +0000 Subject: [PATCH] 00111: Don't try to build a libpythonMAJOR.MINOR.a @@ -21,7 +21,7 @@ Co-authored-by: Miro Hrončok 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 4ad3df1122..72d202d71b 100644 +index 4d2f68447d..3cd2f25571 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -562,7 +562,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c @@ -55,7 +55,7 @@ index 4ad3df1122..72d202d71b 100644 $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) ############################################################################ -@@ -1557,17 +1551,6 @@ libainstall: @DEF_MAKE_RULE@ python-config +@@ -1562,17 +1556,6 @@ libainstall: @DEF_MAKE_RULE@ python-config else true; \ fi; \ done @@ -74,5 +74,5 @@ index 4ad3df1122..72d202d71b 100644 $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in -- -2.21.0 +2.23.0 diff --git a/00189-use-rpm-wheels.patch b/00189-use-rpm-wheels.patch index 349c894..e11b421 100644 --- a/00189-use-rpm-wheels.patch +++ b/00189-use-rpm-wheels.patch @@ -1,26 +1,24 @@ -From e5c11f104e1d2543ac3ba4b3f0a7989821e57947 Mon Sep 17 00:00:00 2001 +From d8ff047b2d9c510ab81e73111999554a8e54eccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 15 Aug 2018 15:36:29 +0200 Subject: [PATCH] 00189: Instead of bundled wheels, use our RPM packaged wheels We keep them in /usr/share/python-wheels --- - Lib/ensurepip/__init__.py | 26 +++++++++++++++++--------- - 1 file changed, 17 insertions(+), 9 deletions(-) + Lib/ensurepip/__init__.py | 25 +++++++++++++++++-------- + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py -index fc0edec6e3..4d17e413db 100644 +index 386ed6c25c..7f5f639bde 100644 --- a/Lib/ensurepip/__init__.py +++ b/Lib/ensurepip/__init__.py -@@ -1,16 +1,27 @@ +@@ -1,3 +1,5 @@ +import distutils.version +import glob import os import os.path --import pkgutil import sys - import tempfile - +@@ -10,10 +12,20 @@ from . import _bundled __all__ = ["version", "bootstrap"] @@ -43,13 +41,13 @@ index fc0edec6e3..4d17e413db 100644 _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION), -@@ -96,12 +107,9 @@ def _bootstrap(*, root=None, upgrade=False, user=False, +@@ -99,12 +111,9 @@ def _bootstrap(*, root=None, upgrade=False, user=False, additional_paths = [] for project, version in _PROJECTS: wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) -- whl = pkgutil.get_data( -- "ensurepip", -- "_bundled/{}".format(wheel_name), +- whl = resources.read_binary( +- _bundled, +- wheel_name, - ) - with open(os.path.join(tmpdir, wheel_name), "wb") as fp: - fp.write(whl) @@ -60,5 +58,5 @@ index fc0edec6e3..4d17e413db 100644 additional_paths.append(os.path.join(tmpdir, wheel_name)) -- -2.21.0 +2.23.0 diff --git a/00251-change-user-install-location.patch b/00251-change-user-install-location.patch index 1e0ddbb..9e38dbd 100644 --- a/00251-change-user-install-location.patch +++ b/00251-change-user-install-location.patch @@ -1,4 +1,4 @@ -From 76330e0a8798b3b03160edc7e8d42d3dbee756fd Mon Sep 17 00:00:00 2001 +From 7438360d65b2e000440d7ee126f32d2500dbd82c Mon Sep 17 00:00:00 2001 From: Michal Cyprian Date: Mon, 26 Jun 2017 16:32:56 +0200 Subject: [PATCH] 00251: Change user install location @@ -60,5 +60,5 @@ index 22d53fa562..9513526109 100644 if os.path.isdir(sitedir): addsitedir(sitedir, known_paths) -- -2.21.0 +2.23.0 diff --git a/00274-fix-arch-names.patch b/00274-fix-arch-names.patch index f383a58..bbcf7f1 100644 --- a/00274-fix-arch-names.patch +++ b/00274-fix-arch-names.patch @@ -1,4 +1,4 @@ -From 64c67dbfa789f242e8ffd1ac88bafb4df2842401 Mon Sep 17 00:00:00 2001 +From 607b2e6099745b2c8c0d55d258ade620e6c35dbd Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mon, 28 Aug 2017 17:16:46 +0200 Subject: [PATCH] 00274: Upstream uses Debian-style architecture naming, change @@ -29,7 +29,7 @@ index ba37cf99e2..52a9ec6662 100755 ppc64le | powerpc64little) basic_machine=powerpc64le-unknown diff --git a/configure.ac b/configure.ac -index 154a0aa5cc..273954f461 100644 +index 4fca719c71..3d06f82981 100644 --- a/configure.ac +++ b/configure.ac @@ -741,9 +741,9 @@ cat >> conftest.c < Date: Thu, 11 Jul 2019 13:44:13 +0200 Subject: [PATCH] 00328: Restore pyc to TIMESTAMP invalidation mode as default @@ -51,5 +51,5 @@ index d6677ab45f..88059b127e 100644 return wrapper -- -2.21.0 +2.23.0 diff --git a/python38.rpmlintrc b/python39.rpmlintrc similarity index 100% rename from python38.rpmlintrc rename to python39.rpmlintrc diff --git a/python38.spec b/python39.spec similarity index 99% rename from python38.spec rename to python39.spec index 53bb8e7..d0c08aa 100644 --- a/python38.spec +++ b/python39.spec @@ -2,10 +2,10 @@ # Top-level metadata # ================== -%global pybasever 3.8 +%global pybasever 3.9 # pybasever without the dot: -%global pyshortver 38 +%global pyshortver 39 Name: python%{pyshortver} Summary: Version %{pybasever} of the Python interpreter @@ -14,7 +14,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}.0 -#global prerel ... +%global prerel a1 %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} Release: 1%{?dist} @@ -1529,6 +1529,9 @@ CheckPython optimized # ====================================================== %changelog +* Wed Nov 20 2019 Miro Hrončok - 3.9.0~a1-1 +- Rebased to Python 3.9.0a1 + * Mon Oct 14 2019 Miro Hrončok - 3.8.0-1 - Update to Python 3.8.0 final diff --git a/sources b/sources index dcd0d93..49e0291 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (Python-3.8.0.tar.xz) = 5f9bfcb3acdf592770a9d5abd2c32c68c55a49b92f958ded069e3ef31cf2d415e67112b4f6738fab237dc29e5c622298719946d2e9471e7e78e3a6bdf2fac1d1 -SHA512 (Python-3.8.0.tar.xz.asc) = 4741bcb9b79019f190fded565dd9851158911f1b0ba71f5972906c267ca6576ebfae7c1e649f8bd9fee6ce2cabb325ef1d85a28ab5962fc9275072d35229d06d +SHA512 (Python-3.9.0a1.tar.xz) = 5880ba1707718dbd21926956faebef3e454b7dae15c880f96140deaff571765a760baa17ca109949b7f70f12c999660ab0071f231f58727e232739d026895e91 +SHA512 (Python-3.9.0a1.tar.xz.asc) = 5c4f31abca1c20be4b7592c97c1fe99ccc3ce494d8905a4aa6d2c96d59207ce7dd6630364a2fe03c9f37c755279c5e3078cba587ccebe165924d2456015d686c diff --git a/tests/tests.yml b/tests/tests.yml index 6d53a9c..eb39252 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,13 +10,13 @@ tests: - smoke: dir: python/smoke - run: VERSION=3.8 ./venv.sh + run: VERSION=3.9 ./venv.sh - selftest: dir: python/selftest - run: VERSION=3.8 X="-x test_wsgiref" ./parallel.sh + run: VERSION=3.9 X="-x test_wsgiref" ./parallel.sh required_packages: - gcc # for extension building in venv and selftest - gdb # for test_gdb - - python38 # the test subject + - python39 # the test subject - python3-tox # for venv tests - glibc-all-langpacks # for locale tests