diff --git a/rpm/0001-Skip-semaphore-test.patch b/rpm/0001-Skip-semaphore-test.patch index fed8ea2..fb40cf3 100644 --- a/rpm/0001-Skip-semaphore-test.patch +++ b/rpm/0001-Skip-semaphore-test.patch @@ -16,26 +16,26 @@ Signed-off-by: David Greaves 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac -index de83332dd3c6e5410a28fff6074c54d7ece630fe..26265b6b1a4a17f214078abe7464ec8af6ef43ef 100644 +index 7b4000fa9c340d949698dcfecb6475eb41fc2027..c394e4b4cbd9a7dbafa856bdd1837f8895cfb07d 100644 --- a/configure.ac +++ b/configure.ac -@@ -4542,7 +4542,7 @@ int main(void) { - } - ]])], - [ac_cv_posix_semaphores_enabled=yes], --[ac_cv_posix_semaphores_enabled=no], -+[ac_cv_posix_semaphores_enabled=yes], - [ac_cv_posix_semaphores_enabled=yes]) +@@ -5543,7 +5543,7 @@ AC_CACHE_CHECK([whether POSIX semaphores are enabled], [ac_cv_posix_semaphores_e + ]) + ], + [ac_cv_posix_semaphores_enabled=yes], +- [ac_cv_posix_semaphores_enabled=no], ++ [ac_cv_posix_semaphores_enabled=yes], + [ac_cv_posix_semaphores_enabled=yes]) ) - AC_MSG_RESULT($ac_cv_posix_semaphores_enabled) -@@ -4578,8 +4578,8 @@ int main(void){ - } - ]])], - [ac_cv_broken_sem_getvalue=no], --[ac_cv_broken_sem_getvalue=yes], --[ac_cv_broken_sem_getvalue=yes]) -+[ac_cv_broken_sem_getvalue=no], -+[ac_cv_broken_sem_getvalue=no]) + AS_VAR_IF([ac_cv_posix_semaphores_enabled], [no], [ +@@ -5580,8 +5580,8 @@ AC_CACHE_CHECK([for broken sem_getvalue], [ac_cv_broken_sem_getvalue], + ]) + ], + [ac_cv_broken_sem_getvalue=no], +- [ac_cv_broken_sem_getvalue=yes], +- [ac_cv_broken_sem_getvalue=yes]) ++ [ac_cv_broken_sem_getvalue=no], ++ [ac_cv_broken_sem_getvalue=no]) ) - AC_MSG_RESULT($ac_cv_broken_sem_getvalue) - if test $ac_cv_broken_sem_getvalue = yes + AS_VAR_IF([ac_cv_broken_sem_getvalue], [yes], [ + AC_DEFINE( diff --git a/rpm/0002-Disable-parallel-compileall-in-make-install.patch b/rpm/0002-Disable-parallel-compileall-in-make-install.patch index d60e97a..d93d701 100644 --- a/rpm/0002-Disable-parallel-compileall-in-make-install.patch +++ b/rpm/0002-Disable-parallel-compileall-in-make-install.patch @@ -10,10 +10,10 @@ Parallel compile breaks with old qemu. 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 7e381283fee886335462bffb73ac464973ee01fa..fd2f89ace2bf21b9b02eda0385e0770a99754cce 100644 +index 81d4d50f82f008e9ad46bd6d83fd9b2cf10219e4..534cfe83af278e08494ed4a4cf9e7e571d792389 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1479,30 +1479,30 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c +@@ -2146,30 +2146,30 @@ libinstall: all $(srcdir)/Modules/xxmodule.c fi -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ diff --git a/rpm/0003-00001-Fixup-distutils-unixccompiler.py-to-remove-sta.patch b/rpm/0003-00001-Fixup-distutils-unixccompiler.py-to-remove-sta.patch index 9bbfdc2..92abd2f 100644 --- a/rpm/0003-00001-Fixup-distutils-unixccompiler.py-to-remove-sta.patch +++ b/rpm/0003-00001-Fixup-distutils-unixccompiler.py-to-remove-sta.patch @@ -2,14 +2,15 @@ From 0000000000000000000000000000000000000000 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 - library path from rpath Was Patch0 in ivazquez' python3000 specfile + library path from rpath +Was Patch0 in ivazquez' python3000 specfile --- Lib/distutils/unixccompiler.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py -index f0792de74a1a489a8232d89b6302c77d91a7552e..4d837936c63a7f43bdf907efc5ab7c508c8c039f 100644 +index d00c48981eb6d65cb89b316822630d4cb76af54d..0283a28c19e95a2d085bcb3fff3977e903456808 100644 --- a/Lib/distutils/unixccompiler.py +++ b/Lib/distutils/unixccompiler.py @@ -82,6 +82,15 @@ class UnixCCompiler(CCompiler): diff --git a/rpm/0004-00102-Change-the-various-install-paths-to-use-usr-li.patch b/rpm/0004-00102-Change-the-various-install-paths-to-use-usr-li.patch deleted file mode 100644 index 1f581a1..0000000 --- a/rpm/0004-00102-Change-the-various-install-paths-to-use-usr-li.patch +++ /dev/null @@ -1,276 +0,0 @@ -From 0000000000000000000000000000000000000000 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/ - instead or /usr/lib/ -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Only used when "%{_lib}" == "lib64". - -Also sets sys.platlibdir to "lib64" for https://github.com/pypa/distutils/issues/110 - -Co-authored-by: David Malcolm -Co-authored-by: Thomas Spura -Co-authored-by: Slavek Kabrda -Co-authored-by: Matej Stuchlik -Co-authored-by: Tomas Orsava -Co-authored-by: Charalampos Stratakis -Co-authored-by: Petr Viktorin -Co-authored-by: Miro HronĨok -Co-authored-by: Iryna Shcherbina ---- - Lib/distutils/command/install.py | 4 ++-- - Lib/distutils/sysconfig.py | 6 +++++- - Lib/distutils/tests/test_install.py | 3 ++- - Lib/site.py | 4 ++++ - Lib/sysconfig.py | 12 ++++++------ - Lib/test/test_site.py | 4 ++-- - Makefile.pre.in | 2 +- - Modules/getpath.c | 6 +++--- - Python/sysmodule.c | 4 ++++ - configure | 4 ++-- - configure.ac | 4 ++-- - setup.py | 6 +++--- - 12 files changed, 36 insertions(+), 23 deletions(-) - -diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py -index c625c95bf7e..ae4f915669c 100644 ---- a/Lib/distutils/command/install.py -+++ b/Lib/distutils/command/install.py -@@ -30,14 +30,14 @@ WINDOWS_SCHEME = { - INSTALL_SCHEMES = { - 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', -- 'platlib': '$platbase/lib/python$py_version_short/site-packages', -+ 'platlib': '$platbase/lib64/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, - 'unix_home': { - 'purelib': '$base/lib/python', -- 'platlib': '$base/lib/python', -+ 'platlib': '$base/lib64/python', - 'headers': '$base/include/python/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', -diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index b51629eb94f..9a4892a737e 100644 ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -146,8 +146,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): - prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": -+ if plat_specific or standard_lib: -+ lib = "lib64" -+ else: -+ lib = "lib" - libpython = os.path.join(prefix, -- "lib", "python" + get_python_version()) -+ lib, "python" + get_python_version()) - if standard_lib: - return libpython - else: -diff --git a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py -index 287ab1989e4..d4c05e0ab1a 100644 ---- a/Lib/distutils/tests/test_install.py -+++ b/Lib/distutils/tests/test_install.py -@@ -57,8 +57,9 @@ class InstallTestCase(support.TempdirManager, - self.assertEqual(got, expected) - - libdir = os.path.join(destination, "lib", "python") -+ platlibdir = os.path.join(destination, "lib64", "python") - check_path(cmd.install_lib, libdir) -- check_path(cmd.install_platlib, libdir) -+ check_path(cmd.install_platlib, platlibdir) - check_path(cmd.install_purelib, libdir) - check_path(cmd.install_headers, - os.path.join(destination, "include", "python", "foopkg")) -diff --git a/Lib/site.py b/Lib/site.py -index 9fa21cca386..2e24e86988f 100644 ---- a/Lib/site.py -+++ b/Lib/site.py -@@ -335,11 +335,15 @@ def getsitepackages(prefixes=None): - seen.add(prefix) - - if os.sep == '/': -+ sitepackages.append(os.path.join(prefix, "lib64", -+ "python" + sys.version[:3], -+ "site-packages")) - sitepackages.append(os.path.join(prefix, "lib", - "python%d.%d" % sys.version_info[:2], - "site-packages")) - else: - sitepackages.append(prefix) -+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages")) - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) - return sitepackages - -diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py -index 3f702d7ea5a..df4f7208042 100644 ---- a/Lib/sysconfig.py -+++ b/Lib/sysconfig.py -@@ -25,10 +25,10 @@ _ALWAYS_STR = { - - _INSTALL_SCHEMES = { - 'posix_prefix': { -- 'stdlib': '{installed_base}/lib/python{py_version_short}', -- 'platstdlib': '{platbase}/lib/python{py_version_short}', -+ 'stdlib': '{installed_base}/lib64/python{py_version_short}', -+ 'platstdlib': '{platbase}/lib64/python{py_version_short}', - 'purelib': '{base}/lib/python{py_version_short}/site-packages', -- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', -+ 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages', - 'include': - '{installed_base}/include/python{py_version_short}{abiflags}', - 'platinclude': -@@ -67,10 +67,10 @@ _INSTALL_SCHEMES = { - 'data': '{userbase}', - }, - 'posix_user': { -- 'stdlib': '{userbase}/lib/python{py_version_short}', -- 'platstdlib': '{userbase}/lib/python{py_version_short}', -+ 'stdlib': '{userbase}/lib64/python{py_version_short}', -+ 'platstdlib': '{userbase}/lib64/python{py_version_short}', - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', -- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', -+ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages', - 'include': '{userbase}/include/python{py_version_short}', - 'scripts': '{userbase}/bin', - 'data': '{userbase}', -diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py -index 9b2df6bfc39..e75ae446375 100644 ---- a/Lib/test/test_site.py -+++ b/Lib/test/test_site.py -@@ -268,8 +268,8 @@ class HelperFunctionsTests(unittest.TestCase): - dirs = site.getsitepackages() - if os.sep == '/': - # OS X, Linux, FreeBSD, etc -- self.assertEqual(len(dirs), 1) -- wanted = os.path.join('xoxo', 'lib', -+ self.assertEqual(len(dirs), 2) -+ wanted = os.path.join('xoxo', 'lib64', - 'python%d.%d' % sys.version_info[:2], - 'site-packages') - self.assertEqual(dirs[0], wanted) -diff --git a/Makefile.pre.in b/Makefile.pre.in -index fd2f89ace2b..5d7bc4e13ad 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -143,7 +143,7 @@ LIBDIR= @libdir@ - MANDIR= @mandir@ - INCLUDEDIR= @includedir@ - CONFINCLUDEDIR= $(exec_prefix)/include --SCRIPTDIR= $(prefix)/lib -+SCRIPTDIR= $(prefix)/lib64 - ABIFLAGS= @ABIFLAGS@ - - # Detailed destination directories -diff --git a/Modules/getpath.c b/Modules/getpath.c -index 63815c5fed8..ca5f481bc6d 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(); - } -- 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; - } -@@ -1063,7 +1063,7 @@ calculate_zip_path(PyCalculatePath *calculate, const wchar_t *prefix, - return PATHLEN_ERR(); - } - } -- 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; - } -@@ -1193,7 +1193,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); - } -diff --git a/Python/sysmodule.c b/Python/sysmodule.c -index a47926727a3..26caa8a835f 100644 ---- a/Python/sysmodule.c -+++ b/Python/sysmodule.c -@@ -2800,6 +2800,10 @@ _PySys_InitCore(_PyRuntimeState *runtime, PyInterpreterState *interp, - PyUnicode_FromString(ABIFLAGS)); - #endif - -+ /* platlibdir is used in pypa/distutils */ -+ SET_SYS_FROM_STRING("platlibdir", -+ PyUnicode_FromString("lib64")); -+ - /* version_info */ - if (VersionInfoType.tp_name == NULL) { - if (PyStructSequence_InitType2(&VersionInfoType, -diff --git a/configure b/configure -index c091865aff7..cb75b637373 100755 ---- a/configure -+++ b/configure -@@ -15264,9 +15264,9 @@ fi - - - if test x$PLATFORM_TRIPLET = x; then -- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" -+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}" - else -- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" -+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" - fi - - -diff --git a/configure.ac b/configure.ac -index 26265b6b1a4..3e466e8a248 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4722,9 +4722,9 @@ fi - dnl define LIBPL after ABIFLAGS and LDVERSION is defined. - AC_SUBST(PY_ENABLE_SHARED) - if test x$PLATFORM_TRIPLET = x; then -- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" -+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}" - else -- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" -+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" - fi - AC_SUBST(LIBPL) - -diff --git a/setup.py b/setup.py -index 57be07a7e0f..0b24dd602e8 100644 ---- a/setup.py -+++ b/setup.py -@@ -634,7 +634,7 @@ class PyBuildExt(build_ext): - # directories (i.e. '.' and 'Include') must be first. See issue - # 10520. - if not CROSS_COMPILING: -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') - # only change this for cross builds for 3.3, issues on Mageia - if CROSS_COMPILING: -@@ -938,11 +938,11 @@ class PyBuildExt(build_ext): - elif curses_library: - readline_libs.append(curses_library) - elif self.compiler.find_library_file(self.lib_dirs + -- ['/usr/lib/termcap'], -+ ['/usr/lib64/termcap'], - 'termcap'): - readline_libs.append('termcap') - self.add(Extension('readline', ['readline.c'], -- library_dirs=['/usr/lib/termcap'], -+ library_dirs=['/usr/lib64/termcap'], - extra_link_args=readline_extra_link_args, - libraries=readline_libs)) - else: diff --git a/rpm/0005-bpo-31046-ensurepip-does-not-honour-the-value-of-pre.patch b/rpm/0004-bpo-31046-ensurepip-does-not-honour-the-value-of-pre.patch similarity index 80% rename from rpm/0005-bpo-31046-ensurepip-does-not-honour-the-value-of-pre.patch rename to rpm/0004-bpo-31046-ensurepip-does-not-honour-the-value-of-pre.patch index dbb3249..f291af3 100644 --- a/rpm/0005-bpo-31046-ensurepip-does-not-honour-the-value-of-pre.patch +++ b/rpm/0004-bpo-31046-ensurepip-does-not-honour-the-value-of-pre.patch @@ -5,31 +5,31 @@ Subject: [PATCH] bpo-31046: ensurepip does not honour the value of $(prefix) Co-Authored-By: Xavier de Gaye --- - Doc/library/ensurepip.rst | 9 +++++++-- + Doc/library/ensurepip.rst | 10 ++++++++-- Lib/ensurepip/__init__.py | 18 +++++++++++++----- Lib/test/test_ensurepip.py | 11 +++++++++++ Makefile.pre.in | 4 ++-- .../2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst | 1 + - 5 files changed, 34 insertions(+), 9 deletions(-) + 5 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst diff --git a/Doc/library/ensurepip.rst b/Doc/library/ensurepip.rst -index a5221250c40486af667f398d22db9d830452baab..6cedc89c6ef37357a8a01309396434bc1b6c0826 100644 +index de3b93f5e6107301b94a96e61ff338dad96ae314..4ecee90e2aab9fad5ed37bb9c8ccd02e11481708 100644 --- a/Doc/library/ensurepip.rst +++ b/Doc/library/ensurepip.rst -@@ -56,8 +56,9 @@ is at least as recent as the one bundled with ``ensurepip``, pass the +@@ -59,7 +59,9 @@ is at least as recent as the one available in ``ensurepip``, pass the By default, ``pip`` is installed into the current virtual environment (if one is active) or into the system site packages (if there is no active virtual environment). The installation location can be controlled -through two additional command line options: +through some additional command line options: - ++ +* ``--prefix ``: Installs ``pip`` using the given directory prefix. - * ``--root ``: Installs ``pip`` relative to the given root directory + + * :samp:`--root {dir}`: Installs ``pip`` relative to the given root directory rather than the root of the currently active virtual environment (if any) - or the default root for the current Python installation. -@@ -89,7 +90,7 @@ Module API - Returns a string specifying the bundled version of pip that will be +@@ -92,7 +94,7 @@ Module API + Returns a string specifying the available version of pip that will be installed when bootstrapping an environment. -.. function:: bootstrap(root=None, upgrade=False, user=False, \ @@ -37,16 +37,16 @@ index a5221250c40486af667f398d22db9d830452baab..6cedc89c6ef37357a8a01309396434bc altinstall=False, default_pip=False, \ verbosity=0) -@@ -99,6 +100,8 @@ Module API +@@ -102,6 +104,8 @@ Module API If *root* is ``None``, then installation uses the default install location for the current environment. + *prefix* specifies the directory prefix to use when installing. + *upgrade* indicates whether or not to upgrade an existing installation - of an earlier version of ``pip`` to the bundled version. + of an earlier version of ``pip`` to the available version. -@@ -119,6 +122,8 @@ Module API +@@ -122,6 +126,8 @@ Module API *verbosity* controls the level of output to :data:`sys.stdout` from the bootstrapping operation. @@ -56,10 +56,10 @@ index a5221250c40486af667f398d22db9d830452baab..6cedc89c6ef37357a8a01309396434bc .. note:: diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py -index 3dfc2da945cdbca34e60a174e66c252ea0833774..039e01dc75efa56c7fec1140fad36ae5ddafc69b 100644 +index f48edd3bc17d50d01fec2cc069a1322252bcfb9c..839ab18f6de22e4025d0c03ddfc3b722dfa32feb 100644 --- a/Lib/ensurepip/__init__.py +++ b/Lib/ensurepip/__init__.py -@@ -55,27 +55,27 @@ def _disable_pip_configuration_settings(): +@@ -122,27 +122,27 @@ def _disable_pip_configuration_settings(): os.environ['PIP_CONFIG_FILE'] = os.devnull @@ -92,7 +92,7 @@ index 3dfc2da945cdbca34e60a174e66c252ea0833774..039e01dc75efa56c7fec1140fad36ae5 Note that calling this function will alter both sys.path and os.environ. """ -@@ -118,6 +118,8 @@ def _bootstrap(*, root=None, upgrade=False, user=False, +@@ -192,6 +192,8 @@ def _bootstrap(*, root=None, upgrade=False, user=False, args = ["install", "--no-cache-dir", "--no-index", "--find-links", tmpdir] if root: args += ["--root", root] @@ -101,7 +101,7 @@ index 3dfc2da945cdbca34e60a174e66c252ea0833774..039e01dc75efa56c7fec1140fad36ae5 if upgrade: args += ["--upgrade"] if user: -@@ -189,6 +191,11 @@ def _main(argv=None): +@@ -266,6 +268,11 @@ def _main(argv=None): default=None, help="Install everything relative to this alternate root directory.", ) @@ -113,7 +113,7 @@ index 3dfc2da945cdbca34e60a174e66c252ea0833774..039e01dc75efa56c7fec1140fad36ae5 parser.add_argument( "--altinstall", action="store_true", -@@ -208,6 +215,7 @@ def _main(argv=None): +@@ -285,6 +292,7 @@ def _main(argv=None): return _bootstrap( root=args.root, @@ -122,10 +122,10 @@ index 3dfc2da945cdbca34e60a174e66c252ea0833774..039e01dc75efa56c7fec1140fad36ae5 user=args.user, verbosity=args.verbosity, diff --git a/Lib/test/test_ensurepip.py b/Lib/test/test_ensurepip.py -index 4786d28f39a3d049cdfed71d7b54bfdbfa6d3a49..8425487d9ed3204f72d4b6dde8fefb2a66941dbf 100644 +index bfca0cd7fbe4834cad0a547549428a258cf04cff..1cdf0c7cb21f8d9ac9e41a05e6886a1f359767c6 100644 --- a/Lib/test/test_ensurepip.py +++ b/Lib/test/test_ensurepip.py -@@ -61,6 +61,17 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase): +@@ -112,6 +112,17 @@ def test_bootstrapping_with_root(self): unittest.mock.ANY, ) @@ -133,7 +133,7 @@ index 4786d28f39a3d049cdfed71d7b54bfdbfa6d3a49..8425487d9ed3204f72d4b6dde8fefb2a + ensurepip.bootstrap(prefix="/foo/bar/") + self.run_pip.assert_called_once_with( + [ -+ "install", "--no-index", "--find-links", ++ "install", "--no-cache-dir", "--no-index", "--find-links", + unittest.mock.ANY, "--prefix", "/foo/bar/", + "setuptools", "pip", + ], @@ -144,10 +144,10 @@ index 4786d28f39a3d049cdfed71d7b54bfdbfa6d3a49..8425487d9ed3204f72d4b6dde8fefb2a ensurepip.bootstrap(user=True) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 5d7bc4e13ad743d9630fa9319533b76dfa967dd6..51d9ca09f3a12157f111d8bd1119f88678e98d6a 100644 +index 534cfe83af278e08494ed4a4cf9e7e571d792389..24332d29c9bf5b3d7a1b468d540550b2a36b249d 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1189,7 +1189,7 @@ install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall @FRAMEWORKI +@@ -1754,7 +1754,7 @@ install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall @FRAMEWORKI install|*) ensurepip="" ;; \ esac; \ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ @@ -156,7 +156,7 @@ index 5d7bc4e13ad743d9630fa9319533b76dfa967dd6..51d9ca09f3a12157f111d8bd1119f886 fi altinstall: commoninstall -@@ -1199,7 +1199,7 @@ altinstall: commoninstall +@@ -1764,7 +1764,7 @@ altinstall: commoninstall install|*) ensurepip="--altinstall" ;; \ esac; \ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ diff --git a/rpm/0006-pyc-timestamp-invalidation-mode.patch b/rpm/0005-00328-Restore-pyc-to-TIMESTAMP-invalidation-mode-as-.patch similarity index 87% rename from rpm/0006-pyc-timestamp-invalidation-mode.patch rename to rpm/0005-00328-Restore-pyc-to-TIMESTAMP-invalidation-mode-as-.patch index 7aa4cfa..c014832 100644 --- a/rpm/0006-pyc-timestamp-invalidation-mode.patch +++ b/rpm/0005-00328-Restore-pyc-to-TIMESTAMP-invalidation-mode-as-.patch @@ -19,7 +19,7 @@ Ideally, we should talk to upstream and explain why we don't want this 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/py_compile.py b/Lib/py_compile.py -index a81f4937310bf81b7e9da68dd7c669dad85b9019..bba3642bf2eebd98711d4e7d33564d4194114ea6 100644 +index 388614e51b1847cbd81400d9ce48dd734e050e14..db5272501631d34ac45af49d0c7268bc10005532 100644 --- a/Lib/py_compile.py +++ b/Lib/py_compile.py @@ -70,7 +70,8 @@ class PycInvalidationMode(enum.Enum): @@ -33,12 +33,12 @@ index a81f4937310bf81b7e9da68dd7c669dad85b9019..bba3642bf2eebd98711d4e7d33564d41 else: return PycInvalidationMode.TIMESTAMP diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py -index e6791c6916ea7fcabaf8873c5ad0620fa9564877..b2d3dcf7fbcccb8071a93fe95d509b4d62e3d13f 100644 +index 741df6b6bfc51f06b6939a06a9c2637ec70a7783..7f24abe3a89867d03dac88b1c973d73e1e792367 100644 --- a/Lib/test/test_py_compile.py +++ b/Lib/test/test_py_compile.py @@ -19,6 +19,7 @@ def without_source_date_epoch(fxn): def wrapper(*args, **kwargs): - with support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env.unset('SOURCE_DATE_EPOCH') + env.unset('RPM_BUILD_ROOT') return fxn(*args, **kwargs) @@ -46,7 +46,7 @@ index e6791c6916ea7fcabaf8873c5ad0620fa9564877..b2d3dcf7fbcccb8071a93fe95d509b4d @@ -29,6 +30,7 @@ def with_source_date_epoch(fxn): def wrapper(*args, **kwargs): - with support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env['SOURCE_DATE_EPOCH'] = '123456789' + env.unset('RPM_BUILD_ROOT') return fxn(*args, **kwargs) diff --git a/rpm/0006-Improve-reproduceability-patch-from-OpenSUSE.patch b/rpm/0006-Improve-reproduceability-patch-from-OpenSUSE.patch new file mode 100644 index 0000000..011f829 --- /dev/null +++ b/rpm/0006-Improve-reproduceability-patch-from-OpenSUSE.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= +Date: Sat, 16 Dec 2023 16:11:18 +0200 +Subject: [PATCH] Improve reproduceability patch from OpenSUSE. + +--- + Lib/distutils/util.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py +index 2ce5c5b64d62fa0731dfffd0d85c25c0affadd55..241ccc8ee2726900ae731d8462f2a77740ebe2f7 100644 +--- a/Lib/distutils/util.py ++++ b/Lib/distutils/util.py +@@ -436,7 +436,7 @@ def byte_compile (py_files, + else: + from py_compile import compile + +- for file in py_files: ++ for file in sorted(py_files): + if file[-3:] != ".py": + # This lets us be lazy and not filter filenames in + # the "install_lib" command. diff --git a/rpm/python3-extra.spec b/rpm/python3-extra.spec index 5d408c1..d759149 100644 --- a/rpm/python3-extra.spec +++ b/rpm/python3-extra.spec @@ -22,10 +22,10 @@ BuildRequires: automake BuildRequires: readline-devel BuildRequires: python3-devel BuildRequires: sqlite-devel -Url: http://www.python.org/ +Url: https://github.com/sailfishos/python3 Summary: Python3 Interpreter extra modules License: Python -Version: 3.8.18 +Version: 3.11.14 Release: 0 Source0: %{name}-%{version}.tar.gz Source1: python3-rpmlintrc @@ -33,25 +33,25 @@ Source1: python3-rpmlintrc # Disables semaphore test. OBS arm build environment doesn't have # /dev/shm mounted, so the test fails, crippling multiprocessing # support for real devices. -Patch0: 0001-Skip-semaphore-test.patch +Patch1: 0001-Skip-semaphore-test.patch # Disable parallel compileall in make install. -Patch1: 0002-Disable-parallel-compileall-in-make-install.patch +Patch2: 0002-Disable-parallel-compileall-in-make-install.patch # Fixup distutils/unixccompiler.py to remove standard library path from rpath: -Patch2: 0003-00001-Fixup-distutils-unixccompiler.py-to-remove-sta.patch -# Change the various install paths to use /usr/lib64/ instead or /usr/lib -# Only used when "%%{_lib}" == "lib64" -Patch3: 0004-00102-Change-the-various-install-paths-to-use-usr-li.patch +Patch3: 0003-00001-Fixup-distutils-unixccompiler.py-to-remove-sta.patch # Ensurepip should honour the value of $(prefix) -Patch4: 0005-bpo-31046-ensurepip-does-not-honour-the-value-of-pre.patch +Patch4: 0004-bpo-31046-ensurepip-does-not-honour-the-value-of-pre.patch # Restore pyc to TIMESTAMP invalidation mode as default -Patch5: 0006-pyc-timestamp-invalidation-mode.patch +Patch5: 0005-00328-Restore-pyc-to-TIMESTAMP-invalidation-mode-as-.patch +# PATCH-FEATURE-UPSTREAM distutils-reproducible-compile.patch gh#python/cpython#8057 mcepl@suse.com +# Improve reproduceability +Patch6: 0006-Improve-reproduceability-patch-from-OpenSUSE.patch %description Additional base modules for Python. -%define python_version 3.8 -%define python_version_abitag 38 -%define python_version_soname 3_8 +%define python_version 3.11 +%define python_version_abitag 311 +%define python_version_soname 3_11 %define sitedir %{_libdir}/python%{python_version} # Some files are named so that they have this platform triplet @@ -85,16 +85,7 @@ Summary: Python3 module for sqlite This package contains the sqlite module for Python. %prep -%setup -q -n %{name}-%{version}/upstream - -%patch -P 0 -p1 -%patch -P 1 -p1 -%patch -P 2 -p1 -%if "%{_lib}" == "lib64" -%patch -P 3 -p1 -%endif -%patch -P 4 -p1 -%patch -P 5 -p1 +%autosetup -p1 -n %{name}-%{version}/upstream %build # use rpm_opt_flags @@ -152,12 +143,15 @@ _statistics _struct _testbuffer _testcapi +_testclinic _testimportmultiple _testinternalcapi _testmultiphase +_typing _uuid _xxsubinterpreters _xxtestfuzz +_zoneinfo array audioop binascii @@ -167,7 +161,6 @@ grp math mmap ossaudiodev -parser pyexpat resource select @@ -176,6 +169,7 @@ syslog termios unicodedata xxlimited +xxlimited_35 zlib EOF @@ -190,7 +184,7 @@ EOF --with-system-ffi=yes LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH \ - make %{?_smp_mflags} sharedmods + %make_build sharedmods %install make \ @@ -202,13 +196,11 @@ make \ rm -f $RPM_BUILD_ROOT%{_bindir}/* %files -n python3-curses -%defattr(644, root, root, 755) %license LICENSE %{dynlib _curses} %{dynlib _curses_panel} %{dynlib readline} %files -n python3-sqlite -%defattr(644, root, root, 755) %license LICENSE %{dynlib _sqlite3} diff --git a/rpm/python3.spec b/rpm/python3.spec index 003918b..f0f0af3 100644 --- a/rpm/python3.spec +++ b/rpm/python3.spec @@ -19,16 +19,14 @@ Name: python3-base BuildRequires: autoconf-archive BuildRequires: automake -BuildRequires: fdupes -BuildRequires: pkgconfig -BuildRequires: xz -BuildRequires: zlib-devel -BuildRequires: openssl-devel BuildRequires: bzip2-devel -BuildRequires: xz-devel +BuildRequires: fdupes BuildRequires: glibc-headers BuildRequires: libffi-devel -BuildRequires: pkgconfig(libcrypt) +BuildRequires: openssl-devel +BuildRequires: pkgconfig +BuildRequires: xz-devel +BuildRequires: zlib-devel # The RPM related dependencies bring nothing when building main python # project, that is why we need to explicitly depend rpm generators. # When bootstrapping python3, we need to build setuptools. @@ -41,10 +39,10 @@ BuildRequires: pkgconfig(libcrypt) BuildRequires: python3-rpm-generators %endif -Url: http://www.python.org/ +Url: https://github.com/sailfishos/python3 Summary: Python3 Interpreter License: Python -Version: 3.8.18 +Version: 3.11.14 Release: 0 Source0: %{name}-%{version}.tar.gz Source1: python3-rpmlintrc @@ -52,22 +50,22 @@ Source1: python3-rpmlintrc # Disables semaphore test. OBS arm build environment doesn't have # /dev/shm mounted, so the test fails, crippling multiprocessing # support for real devices. -Patch0: 0001-Skip-semaphore-test.patch +Patch1: 0001-Skip-semaphore-test.patch # Disable parallel compileall in make install. -Patch1: 0002-Disable-parallel-compileall-in-make-install.patch +Patch2: 0002-Disable-parallel-compileall-in-make-install.patch # Fixup distutils/unixccompiler.py to remove standard library path from rpath: -Patch2: 0003-00001-Fixup-distutils-unixccompiler.py-to-remove-sta.patch -# Change the various install paths to use /usr/lib64/ instead or /usr/lib -# Only used when "%%{_lib}" == "lib64" -Patch3: 0004-00102-Change-the-various-install-paths-to-use-usr-li.patch +Patch3: 0003-00001-Fixup-distutils-unixccompiler.py-to-remove-sta.patch # Ensurepip should honour the value of $(prefix) -Patch4: 0005-bpo-31046-ensurepip-does-not-honour-the-value-of-pre.patch +Patch4: 0004-bpo-31046-ensurepip-does-not-honour-the-value-of-pre.patch # Restore pyc to TIMESTAMP invalidation mode as default -Patch5: 0006-pyc-timestamp-invalidation-mode.patch - -%define python_version 3.8 -%define python_version_abitag 38 -%define python_version_soname 3_8 +Patch5: 0005-00328-Restore-pyc-to-TIMESTAMP-invalidation-mode-as-.patch +# PATCH-FEATURE-UPSTREAM distutils-reproducible-compile.patch gh#python/cpython#8057 mcepl@suse.com +# Improve reproduceability +Patch6: 0006-Improve-reproduceability-patch-from-OpenSUSE.patch + +%define python_version 3.11 +%define python_version_abitag 311 +%define python_version_soname 3_11 %define sitedir %{_libdir}/python%{python_version} # Some files are named so that they have this platform triplet @@ -173,16 +171,7 @@ This package provides man pages for %{name}. %prep -%setup -q -n %{name}-%{version}/upstream - -%patch -P 0 -p1 -%patch -P 1 -p1 -%patch -P 2 -p1 -%if "%{_lib}" == "lib64" -%patch -P 3 -p1 -%endif -%patch -P 4 -p1 -%patch -P 5 -p1 +%autosetup -p1 -n %{name}-%{version}/upstream # drop Autoconf version requirement sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac @@ -213,6 +202,7 @@ _sqlite3 EOF ./configure \ + --with-platlibdir=%{_lib} \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --mandir=%{_mandir} \ @@ -224,7 +214,7 @@ EOF --with-system-ffi=yes LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH \ - make %{?_smp_mflags} + %make_build %install # replace rest of /usr/local/bin/python or /usr/bin/python2.5 or /usr/bin/python3m with /usr/bin/python3 @@ -236,10 +226,7 @@ find . -path "./Parser" -prune \ # the grep inbetween makes it much faster # install it -make \ - OPT="%{optflags} -fPIC" \ - DESTDIR=$RPM_BUILD_ROOT \ - install +%make_install # remove .a find ${RPM_BUILD_ROOT} -name "*.a" -exec rm {} ";" @@ -288,9 +275,6 @@ install -c -m 644 README.rst $PDOCS/ find $RPM_BUILD_ROOT%{sitedir}/ -type f -name '*.exe' -delete -%clean -rm -rf $RPM_BUILD_ROOT - %files -n python3-doc %docdir %{_docdir}/%{name} %{_docdir}/%{name}/README.rst @@ -302,11 +286,9 @@ rm -rf $RPM_BUILD_ROOT %postun -n python3-libs -p /sbin/ldconfig %files -n python3-libs -%defattr(644, root,root) %{_libdir}/libpython%{python_version}.so.* %files -n python3-devel -%defattr(644, root, root, 755) %{_libdir}/python%{python_version}/config-%{python_version}-%{platform_triplet} %{_libdir}/libpython%{python_version}.so %{_libdir}/libpython3.so @@ -319,15 +301,14 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/2to3-%{python_version} %files -n python3-testsuite -%defattr(644, root, root, 755) %{sitedir}/test %{sitedir}/*/test %{sitedir}/*/tests %{dynlib _ctypes_test} %{dynlib _testcapi} +%{dynlib _testclinic} %files -%defattr(644, root, root, 755) %license LICENSE # binary parts %dir %{sitedir}/lib-dynload @@ -359,7 +340,6 @@ rm -rf $RPM_BUILD_ROOT %{dynlib _multibytecodec} %{dynlib _multiprocessing} %{dynlib ossaudiodev} -%{dynlib parser} %{dynlib _pickle} %{dynlib _posixsubprocess} %{dynlib _random} @@ -370,6 +350,7 @@ rm -rf $RPM_BUILD_ROOT %{dynlib _struct} %{dynlib syslog} %{dynlib termios} +%{dynlib _typing} %{dynlib _testbuffer} %{dynlib unicodedata} %{dynlib zlib} @@ -380,6 +361,8 @@ rm -rf $RPM_BUILD_ROOT %{dynlib _queue} %{dynlib _testmultiphase} %{dynlib _xxtestfuzz} +%{dynlib xxlimited_35} +%{dynlib _zoneinfo} # hashlib fallback modules %{dynlib _md5} %{dynlib _sha1} @@ -423,14 +406,18 @@ rm -rf $RPM_BUILD_ROOT %{sitedir}/logging %{sitedir}/multiprocessing %{sitedir}/pydoc_data +%{sitedir}/re +%{sitedir}/tomllib %{sitedir}/unittest %{sitedir}/urllib %{sitedir}/venv %{sitedir}/wsgiref +%{sitedir}/zoneinfo %{sitedir}/sqlite3 %{sitedir}/dbm %{sitedir}/curses %{sitedir}/site-packages/README.txt +%{sitedir}/__phello__ %{sitedir}/__pycache__ %if "%{_lib}" == "lib64" %attr(755, root, root) %dir %{_prefix}/lib/python%{python_version} @@ -440,7 +427,6 @@ rm -rf $RPM_BUILD_ROOT # new in python 3.4 %{sitedir}/asyncio %{sitedir}/site-packages/__pycache__ -%exclude %{sitedir}/site-packages/__pycache__/easy_install* # executables %attr(755, root, root) %{_bindir}/pydoc%{python_version} %attr(755, root, root) %{_bindir}/python%{python_version} diff --git a/upstream b/upstream index a56dcae..cd1c3a6 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit a56dcaefd66fc2fdd16ce21be9fc95fa40037c21 +Subproject commit cd1c3a6342869b7346c1b5c27b8de9c6ef9c4e69