Rebased to Python 3.9.0a1

Actually rebased patches: 102, 189

New patches at https://github.com/fedora-python/cpython/tree/fedora-3.9
This commit is contained in:
Miro Hrončok 2019-11-20 10:35:05 +01:00
parent 6b5182a34c
commit b180b3028c
11 changed files with 64 additions and 63 deletions

View File

@ -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 <dmalcolm@redhat.com>
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

View File

@ -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 <dmalcolm@redhat.com>
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

View File

@ -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 <dmalcolm@redhat.com>
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 <miro@hroncok.cz>
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

View File

@ -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?= <miro@hroncok.cz>
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

View File

@ -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 <m.cyprian@gmail.com>
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

View File

@ -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 <pviktori@redhat.com>
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 <<EOF
@ -82,5 +82,5 @@ index 154a0aa5cc..273954f461 100644
s390x-linux-gnu
# elif defined(__s390__)
--
2.21.0
2.23.0

View File

@ -1,4 +1,4 @@
From c706770ce2d951d9357ffc872b7e3f70ad36c264 Mon Sep 17 00:00:00 2001
From 4c5bee74ff3d4033a60359640bac9f156fdf50ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
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

View File

@ -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 <mhroncok@redhat.com> - 3.9.0~a1-1
- Rebased to Python 3.9.0a1
* Mon Oct 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0-1
- Update to Python 3.8.0 final

View File

@ -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

View File

@ -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