diff --git a/F00251-change-user-install-location.patch b/F00251-change-user-install-location.patch index 99d06be..1fc111b 100644 --- a/F00251-change-user-install-location.patch +++ b/F00251-change-user-install-location.patch @@ -13,11 +13,9 @@ Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe Lib/site.py | 9 ++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) -diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py -index ae4f915669..0e4fd5b74a 100644 --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py -@@ -418,8 +418,19 @@ class install(Command): +@@ -419,8 +419,19 @@ class install(Command): raise DistutilsOptionError( "must not supply exec-prefix without prefix") @@ -39,11 +37,9 @@ index ae4f915669..0e4fd5b74a 100644 else: if self.exec_prefix is None: -diff --git a/Lib/site.py b/Lib/site.py -index 22d53fa562..9513526109 100644 --- a/Lib/site.py +++ b/Lib/site.py -@@ -348,7 +348,14 @@ def getsitepackages(prefixes=None): +@@ -353,7 +353,14 @@ def getsitepackages(prefixes=None): return sitepackages def addsitepackages(known_paths, prefixes=None): @@ -59,6 +55,3 @@ index 22d53fa562..9513526109 100644 for sitedir in getsitepackages(prefixes): if os.path.isdir(sitedir): addsitedir(sitedir, known_paths) --- -2.21.0 - diff --git a/OBS_dev-shm.patch b/OBS_dev-shm.patch deleted file mode 100644 index 32a508c..0000000 --- a/OBS_dev-shm.patch +++ /dev/null @@ -1,175 +0,0 @@ -From 0edba4a774f8fc6867d49ebd2d9c6831901e30dd Mon Sep 17 00:00:00 2001 -From: Victor Stinner -Date: Wed, 17 Jun 2020 17:53:48 +0200 -Subject: [PATCH] bpo-38377: Add - support.skip_if_broken_multiprocessing_synchronize() - -On Linux, skip tests using multiprocessing if the current user cannot -create a file in /dev/shm/ directory. Add the -skip_if_broken_multiprocessing_synchronize() function to the -test.support module. ---- - Doc/library/test.rst | 8 +++++++ - Lib/test/_test_multiprocessing.py | 2 +- - Lib/test/support/__init__.py | 22 +++++++++++++++++++ - Lib/test/test_asyncio/test_events.py | 4 ++-- - Lib/test/test_concurrent_futures.py | 2 +- - Lib/test/test_logging.py | 8 +++---- - .../test_multiprocessing_main_handling.py | 2 +- - Lib/test/test_venv.py | 8 ++++--- - .../2020-06-17-18-00-21.bpo-38377.jfg4TH.rst | 4 ++++ - 9 files changed, 48 insertions(+), 12 deletions(-) - create mode 100644 Misc/NEWS.d/next/Tests/2020-06-17-18-00-21.bpo-38377.jfg4TH.rst - ---- a/Doc/library/test.rst -+++ b/Doc/library/test.rst -@@ -1282,6 +1282,14 @@ The :mod:`test.support` module defines t - - .. versionadded:: 3.6 - -+.. function:: skip_if_broken_multiprocessing_synchronize() -+ -+ Skip tests if the :mod:`multiprocessing.synchronize` module is missing, if -+ there is no available semaphore implementation, or if creating a lock raises -+ an :exc:`OSError`. -+ -+ .. versionadded:: 3.10 -+ - - The :mod:`test.support` module defines the following classes: - ---- a/Lib/test/_test_multiprocessing.py -+++ b/Lib/test/_test_multiprocessing.py -@@ -31,7 +31,7 @@ from test import support - # Skip tests if _multiprocessing wasn't built. - _multiprocessing = test.support.import_module('_multiprocessing') - # Skip tests if sem_open implementation is broken. --test.support.import_module('multiprocessing.synchronize') -+support.skip_if_broken_multiprocessing_synchronize() - import threading - - import multiprocessing.connection ---- a/Lib/test/support/__init__.py -+++ b/Lib/test/support/__init__.py -@@ -3350,3 +3350,25 @@ class catch_threading_exception: - del self.exc_value - del self.exc_traceback - del self.thread -+ -+def skip_if_broken_multiprocessing_synchronize(): -+ """ -+ Skip tests if the multiprocessing.synchronize module is missing, if there -+ is no available semaphore implementation, or if creating a lock raises an -+ OSError. -+ """ -+ -+ # Skip tests if the _multiprocessing extension is missing. -+ import_module('_multiprocessing') -+ -+ # Skip tests if there is no available semaphore implementation: -+ # multiprocessing.synchronize requires _multiprocessing.SemLock. -+ synchronize = import_module('multiprocessing.synchronize') -+ -+ try: -+ # bpo-38377: On Linux, creating a semaphore is the current user -+ # does not have the permission to create a file in /dev/shm. -+ # Create a semaphore to check permissions. -+ synchronize.Lock(ctx=None) -+ except OSError as exc: -+ raise unittest.SkipTest(f"broken multiprocessing SemLock: {exc!r}") ---- a/Lib/test/test_asyncio/test_events.py -+++ b/Lib/test/test_asyncio/test_events.py -@@ -2635,10 +2635,10 @@ class GetEventLoopTestsMixin: - if sys.platform != 'win32': - - def test_get_event_loop_new_process(self): -- # Issue bpo-32126: The multiprocessing module used by -+ # bpo-32126: The multiprocessing module used by - # ProcessPoolExecutor is not functional when the - # multiprocessing.synchronize module cannot be imported. -- support.import_module('multiprocessing.synchronize') -+ support.skip_if_broken_multiprocessing_synchronize() - - async def main(): - pool = concurrent.futures.ProcessPoolExecutor() ---- a/Lib/test/test_concurrent_futures.py -+++ b/Lib/test/test_concurrent_futures.py -@@ -3,7 +3,7 @@ import test.support - # Skip tests if _multiprocessing wasn't built. - test.support.import_module('_multiprocessing') - # Skip tests if sem_open implementation is broken. --test.support.import_module('multiprocessing.synchronize') -+test.support.skip_if_broken_multiprocessing_synchronize() - - from test.support.script_helper import assert_python_ok - ---- a/Lib/test/test_logging.py -+++ b/Lib/test/test_logging.py -@@ -3621,9 +3621,9 @@ if hasattr(logging.handlers, 'QueueListe - - @patch.object(logging.handlers.QueueListener, 'handle') - def test_handle_called_with_mp_queue(self, mock_handle): -- # Issue 28668: The multiprocessing (mp) module is not functional -+ # bpo-28668: The multiprocessing (mp) module is not functional - # when the mp.synchronize module cannot be imported. -- support.import_module('multiprocessing.synchronize') -+ support.skip_if_broken_multiprocessing_synchronize() - for i in range(self.repeat): - log_queue = multiprocessing.Queue() - self.setup_and_log(log_queue, '%s_%s' % (self.id(), i)) -@@ -3647,9 +3647,9 @@ if hasattr(logging.handlers, 'QueueListe - indicates that messages were not registered on the queue until - _after_ the QueueListener stopped. - """ -- # Issue 28668: The multiprocessing (mp) module is not functional -+ # bpo-28668: The multiprocessing (mp) module is not functional - # when the mp.synchronize module cannot be imported. -- support.import_module('multiprocessing.synchronize') -+ support.skip_if_broken_multiprocessing_synchronize() - for i in range(self.repeat): - queue = multiprocessing.Queue() - self.setup_and_log(queue, '%s_%s' %(self.id(), i)) ---- a/Lib/test/test_multiprocessing_main_handling.py -+++ b/Lib/test/test_multiprocessing_main_handling.py -@@ -23,7 +23,7 @@ import multiprocessing - AVAILABLE_START_METHODS = set(multiprocessing.get_all_start_methods()) - - # Issue #22332: Skip tests if sem_open implementation is broken. --support.import_module('multiprocessing.synchronize') -+support.skip_if_broken_multiprocessing_synchronize() - - verbose = support.verbose - ---- a/Lib/test/test_venv.py -+++ b/Lib/test/test_venv.py -@@ -16,7 +16,8 @@ import sys - import tempfile - from test.support import (captured_stdout, captured_stderr, requires_zlib, - can_symlink, EnvironmentVarGuard, rmtree, -- import_module) -+ import_module, -+ skip_if_broken_multiprocessing_synchronize) - import threading - import unittest - import venv -@@ -324,10 +325,11 @@ class BasicTest(BaseTest): - """ - Test that the multiprocessing is able to spawn. - """ -- # Issue bpo-36342: Instanciation of a Pool object imports the -+ # bpo-36342: Instantiation of a Pool object imports the - # multiprocessing.synchronize module. Skip the test if this module - # cannot be imported. -- import_module('multiprocessing.synchronize') -+ skip_if_broken_multiprocessing_synchronize() -+ - rmtree(self.env_dir) - self.run_with_capture(venv.create, self.env_dir) - envpy = os.path.join(os.path.realpath(self.env_dir), ---- /dev/null -+++ b/Misc/NEWS.d/next/Tests/2020-06-17-18-00-21.bpo-38377.jfg4TH.rst -@@ -0,0 +1,4 @@ -+On Linux, skip tests using multiprocessing if the current user cannot create -+a file in ``/dev/shm/`` directory. Add the -+:func:`~test.support.skip_if_broken_multiprocessing_synchronize` function to -+the :mod:`test.support` module. diff --git a/Python-3.8.3.tar.xz b/Python-3.8.3.tar.xz deleted file mode 100644 index e233455..0000000 --- a/Python-3.8.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dfab5ec723c218082fe3d5d7ae17ecbdebffa9a1aea4d64aa3a2ecdd2e795864 -size 17912964 diff --git a/Python-3.8.3.tar.xz.asc b/Python-3.8.3.tar.xz.asc deleted file mode 100644 index 7025888..0000000 --- a/Python-3.8.3.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl68Z1QACgkQsmmV4xAl -BWhdxQ/+PUi0er9eBEaWNaatCsEDXnBvrCs1OooL3WWJ2GC5zf3buMwj2pFOZf9D -YFFGdomhYhvRnyQCJQSXuWJXQaafzKAl1tvkgS2ycOnLvCJ/qw71SqorQxkMGK1m -TYZyLEapNkXrfDXRHfGybuVlNsHw9++abpEITqwucTWm9LiHZoF/zdK+JX/5RYQ0 -bfb8819DMZEyCsF+S8Jo6ZNyEIQyQxidFFt5HbMllFwsgzu37P8RqGSIoVNFJ8n9 -f7BWfXAIyGr7pIlJ+3qBYDXOeOx8iwIUxGu3Gbmiri+dlxz28Iei4mxPYHG4ji5B -3zMsqKcaVAMHzKuAwdF5ZbUg0DRRJweNoiDOsfKp0CI814pXmOLH0zi9OiLrxBzj -7v9H3dAPMC2f2zAFdNcjYVBRovCxIork/Lj3+6jGn67+8oV+eb23gnN5YpDAFAAu -ybtrt6fEi0uVJuxUl+MO5HkSmH3sLggVDskvuWPFLiuahcbSuiZoCvlB+osO9J0H -el/3Awv5TjckY/EVDt1T61aYLX0CHNcb8c/CjAf0OSd/96WxV3svtusllqcSYwiC -NxBRf0klpGn0Tpa+9hTAMc4dEKILgao1KsKiI8dj8YY3HcE0Lb3y9UdFcIDLCeqn -Sk5turYyKak7apZTY31/0eqqCUl/RlZwpmxVUUNViwR5F2ZPeAQ= -=jF/G ------END PGP SIGNATURE----- diff --git a/Python-3.9.0b4.tar.xz b/Python-3.9.0b4.tar.xz new file mode 100644 index 0000000..56178d9 --- /dev/null +++ b/Python-3.9.0b4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:344634bc7f3327284ad1349699d289aafd85a426524651dffdd5eb6cec216304 +size 18602256 diff --git a/Python-3.9.0b4.tar.xz.asc b/Python-3.9.0b4.tar.xz.asc new file mode 100644 index 0000000..a54d194 --- /dev/null +++ b/Python-3.9.0b4.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl7+IiYACgkQsmmV4xAl +BWhWXg//QfKt/XvTTwS4OYi9u2/BYewVRCwhF9xle1r+Q8yaZKqD5ptjIvlMDFD5 +SbUR4yoZTwFnWRh1xO+LO8ysuqQgweF/swtIaygqcgIJhOieaOOZFhOROdMOjlqK +h9yjvWIz4RYJiB3ASg3DTTYvWDQhu/7mCMhybaeUqh630+cOjb3oxmVCalZCimun +DTXLcb4XY5X4p0JrndJZGWwIIKAAoUNf04PYPY/Y2xfsSyIFEf9dVbtDwT5eYU4J +bmm+8yPHhCotWZSLZzRMw+4pn+bKoTEYLpEellzmhv6Nd8tZ+Ig2atjUD9vmblEH +PqnrLu9s4qHCMSK+38qCIYA6VN7ykZgPMScHSjtcUOz8Nx5SnyFqV6RZwlMV71Hd +llifxqvgehY6+EnFPhVsgVbW+N1ueD26UalU0YmpXKScfVJe8mzbSFHN/EDfjEto +tYxAaX8KcUgyLMurCRItLTbZ6Ycqod1IUsJY9AQtrYYl2uS93jh5Nb+u+lC11jnH +KUHUSVchCcQi298noYRlYcrGyJo+8X5kEWKxM9nO0KNogArBoGg+TcZKHgm1Ar8R +gTX5dcWWqUmGxDoMdPW8WJ4YOq0MCY2+DgnOQ6HpgPoIpgM72c+RVvh8E/WW5C+B +w7Fx3jri9EB6VY/0gpkrADHsW5js54EBM4GyzL+UnRXwNgwFAgQ= +=nWKR +-----END PGP SIGNATURE----- diff --git a/SUSE-FEDORA-multilib.patch b/SUSE-FEDORA-multilib.patch deleted file mode 100644 index 48f09de..0000000 --- a/SUSE-FEDORA-multilib.patch +++ /dev/null @@ -1,396 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -4671,12 +4671,26 @@ else - LIBPYTHON='' - fi - -+# platsubdir must be defined before LIBPL definition -+AC_MSG_CHECKING(for custom platsubdir) -+AC_ARG_WITH(custom-platsubdir, -+ [AS_HELP_STRING([--with-custom-platsubdir=], -+ [set the platsubdir name to a custom string])], -+ [], -+ [with_custom_platsubdir=yes]) -+AS_CASE($with_custom_platsubdir, -+ [yes],[platsubdir=`basename ${libdir}`], -+ [no],[platsubdir=lib], -+ [platsubdir=$with_custom_platsubdir]) -+AC_MSG_RESULT($platsubdir) -+AC_SUBST(platsubdir) -+ - dnl define LIBPL after ABIFLAGS and LDVERSION is defined. - AC_SUBST(PY_ENABLE_SHARED) - if test x$PLATFORM_TRIPLET = x; then -- LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}" -+ LIBPL='$(prefix)'"/${platsubdir}/python${VERSION}/config-${LDVERSION}" - else -- LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" -+ LIBPL='$(prefix)'"/${platsubdir}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" - fi - AC_SUBST(LIBPL) - ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -137,13 +137,16 @@ exec_prefix= @exec_prefix@ - # Install prefix for data files - datarootdir= @datarootdir@ - -+# Name of "lib" directory under prefix -+platsubdir= @platsubdir@ -+ - # Expanded directories - BINDIR= @bindir@ - LIBDIR= @libdir@ - MANDIR= @mandir@ - INCLUDEDIR= @includedir@ - CONFINCLUDEDIR= $(exec_prefix)/include --SCRIPTDIR= $(prefix)/lib64 -+SCRIPTDIR= @libdir@ - ABIFLAGS= @ABIFLAGS@ - - # Detailed destination directories -@@ -754,6 +757,7 @@ Modules/getpath.o: $(srcdir)/Modules/get - -DEXEC_PREFIX='"$(exec_prefix)"' \ - -DVERSION='"$(VERSION)"' \ - -DVPATH='"$(VPATH)"' \ -+ -DPLATLIBDIR='"$(platsubdir)"' \ - -o $@ $(srcdir)/Modules/getpath.c - - Programs/python.o: $(srcdir)/Programs/python.c ---- a/Modules/getpath.c -+++ b/Modules/getpath.c -@@ -55,12 +55,12 @@ - * pybuilddir.txt. If the landmark is found, we're done. - * - * For the remaining steps, the prefix landmark will always be -- * lib/python$VERSION/os.py and the exec_prefix will always be -- * lib/python$VERSION/lib-dynload, where $VERSION is Python's version -- * number as supplied by the Makefile. Note that this means that no more -- * build directory checking is performed; if the first step did not find -- * the landmarks, the assumption is that python is running from an -- * installed setup. -+ * $lib/python$VERSION/os.py and the exec_prefix will always be -+ * $lib/python$VERSION/lib-dynload, where $VERSION is Python's version -+ * number and $lib is PLATLIBDIR as supplied by the Makefile. Note that -+ * this means that no more build directory checking is performed; if the -+ * first step did not find the landmarks, the assumption is that python -+ * is running from an installed setup. - * - * Step 2. See if the $PYTHONHOME environment variable points to the - * installed location of the Python libraries. If $PYTHONHOME is set, then -@@ -86,7 +86,7 @@ - * containing the shared library modules is appended. The environment - * variable $PYTHONPATH is inserted in front of it all. Finally, the - * prefix and exec_prefix globals are tweaked so they reflect the values -- * expected by other code, by stripping the "lib/python$VERSION/..." stuff -+ * expected by other code, by stripping the "$lib/python$VERSION/..." stuff - * off. If either points to the build directory, the globals are reset to - * the corresponding preprocessor variables (so sys.prefix will reflect the - * installation location, even though sys.path points into the build -@@ -105,8 +105,8 @@ extern "C" { - #endif - - --#if !defined(PREFIX) || !defined(EXEC_PREFIX) || !defined(VERSION) || !defined(VPATH) --#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" -+#if !defined(PREFIX) || !defined(EXEC_PREFIX) || !defined(VERSION) || !defined(VPATH) || !defined(PLATLIBDIR) -+#error "PREFIX, EXEC_PREFIX, VERSION, VPATH, and PLATLIBDIR must be constant defined" - #endif - - #ifndef LANDMARK -@@ -730,7 +730,7 @@ calculate_exec_prefix(PyCalculatePath *c - if (safe_wcscpy(exec_prefix, calculate->exec_prefix, exec_prefix_len) < 0) { - return PATHLEN_ERR(); - } -- status = joinpath(exec_prefix, L"lib64/lib-dynload", exec_prefix_len); -+ status = joinpath(exec_prefix, L"lib/lib-dynload", exec_prefix_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -1067,7 +1067,7 @@ calculate_zip_path(PyCalculatePath *calc - return PATHLEN_ERR(); - } - } -- status = joinpath(zip_path, L"lib64/python00.zip", zip_path_len); -+ status = joinpath(zip_path, L"lib/python00.zip", zip_path_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -1197,7 +1197,7 @@ calculate_init(PyCalculatePath *calculat - if (!calculate->exec_prefix) { - return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); - } -- calculate->lib_python = Py_DecodeLocale("lib64/python" VERSION, &len); -+ calculate->lib_python = Py_DecodeLocale(PLATLIBDIR "/python" VERSION, &len); - if (!calculate->lib_python) { - return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); - } ---- 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/lib64/python$py_version_short/site-packages', -+ 'platlib': '$platbase/$platsubdir/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/lib64/python', -+ 'platlib': '$base/lib/python', - 'headers': '$base/include/python/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', -@@ -281,7 +281,7 @@ class install(Command): - # about needing recursive variable expansion (shudder). - - py_version = sys.version.split()[0] -- (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') -+ (prefix, exec_prefix, platsubdir) = get_config_vars('prefix', 'exec_prefix', 'platsubdir') - try: - abiflags = sys.abiflags - except AttributeError: -@@ -298,6 +298,7 @@ class install(Command): - 'sys_exec_prefix': exec_prefix, - 'exec_prefix': exec_prefix, - 'abiflags': abiflags, -+ 'platsubdir': platsubdir, - } - - if HAS_USER_SITE: -@@ -419,12 +420,11 @@ class install(Command): - "must not supply exec-prefix without 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): -+ # if the executable is /usr/bin/python* and RPM build -+ # is not detected to make pip and distutils install into -+ # the separate location. -+ if (sys.executable.startswith("/usr/bin/python") -+ and 'RPM_BUILD_ROOT' not in os.environ): - addition = "/local" - else: - addition = "" ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -146,12 +146,9 @@ def get_python_lib(plat_specific=0, stan - prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": -- if plat_specific or standard_lib: -- lib = "lib64" -- else: -- lib = "lib" -+ libdir = plat_specific and get_config_var("platsubdir") or "lib" - libpython = os.path.join(prefix, -- lib, "python" + get_python_version()) -+ libdir, "python" + get_python_version()) - if standard_lib: - return libpython - else: ---- a/Lib/sysconfig.py -+++ b/Lib/sysconfig.py -@@ -20,10 +20,10 @@ __all__ = [ - - _INSTALL_SCHEMES = { - 'posix_prefix': { -- 'stdlib': '{installed_base}/lib64/python{py_version_short}', -- 'platstdlib': '{platbase}/lib64/python{py_version_short}', -+ 'stdlib': '{installed_base}/{platsubdir}/python{py_version_short}', -+ 'platstdlib': '{platbase}/{platsubdir}/python{py_version_short}', - 'purelib': '{base}/lib/python{py_version_short}/site-packages', -- 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages', -+ 'platlib': '{platbase}/{platsubdir}/python{py_version_short}/site-packages', - 'include': - '{installed_base}/include/python{py_version_short}{abiflags}', - 'platinclude': -@@ -62,10 +62,10 @@ _INSTALL_SCHEMES = { - 'data': '{userbase}', - }, - 'posix_user': { -- 'stdlib': '{userbase}/lib64/python{py_version_short}', -- 'platstdlib': '{userbase}/lib64/python{py_version_short}', -+ 'stdlib': '{userbase}/lib/python{py_version_short}', -+ 'platstdlib': '{userbase}/lib/python{py_version_short}', - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', -- 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages', -+ 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', - 'include': '{userbase}/include/python{py_version_short}', - 'scripts': '{userbase}/bin', - 'data': '{userbase}', ---- a/Lib/site.py -+++ b/Lib/site.py -@@ -335,12 +335,18 @@ def getsitepackages(prefixes=None): - seen.add(prefix) - - if os.sep == '/': -- sitepackages.append(os.path.join(prefix, "lib64", -+ from sysconfig import get_config_var -+ platsubdir = get_config_var("platsubdir") -+ sitepackages.append(os.path.join(prefix, platsubdir, - "python" + sys.version[:3], - "site-packages")) -- sitepackages.append(os.path.join(prefix, "lib", -+ sitepackages.append(os.path.join(prefix, platsubdir, - "python%d.%d" % sys.version_info[:2], - "site-packages")) -+ if platsubdir != "lib": -+ 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")) -@@ -348,14 +354,7 @@ def getsitepackages(prefixes=None): - return sitepackages - - def addsitepackages(known_paths, prefixes=None): -- """Add site-packages to sys.path -- -- '/usr/local' is included in PREFIXES if RPM build is not detected -- to make packages installed into this location visible. -- -- """ -- if ENABLE_USER_SITE and 'RPM_BUILD_ROOT' not in os.environ: -- PREFIXES.insert(0, "/usr/local") -+ """Add site-packages to sys.path""" - for sitedir in getsitepackages(prefixes): - if os.path.isdir(sitedir): - addsitedir(sitedir, known_paths) ---- a/Lib/test/test_site.py -+++ b/Lib/test/test_site.py -@@ -266,8 +266,11 @@ class HelperFunctionsTests(unittest.Test - dirs = site.getsitepackages() - if os.sep == '/': - # OS X, Linux, FreeBSD, etc -- self.assertEqual(len(dirs), 2) -- wanted = os.path.join('xoxo', 'lib64', -+ self.assertTrue(len(dirs) in (1,2,3), -+ "dirs = {} has len not in (1,2,3).".format(dirs)) -+ -+ platsubdir = sysconfig.get_config_var('platsubdir') -+ wanted = os.path.join('xoxo', platsubdir, - 'python%d.%d' % sys.version_info[:2], - 'site-packages') - self.assertEqual(dirs[0], wanted) ---- a/Lib/test/test_sysconfig.py -+++ b/Lib/test/test_sysconfig.py -@@ -243,6 +243,7 @@ class TestSysConfig(unittest.TestCase): - # is similar to the global posix_prefix one - base = get_config_var('base') - user = get_config_var('userbase') -+ platsubdir = get_config_var("platsubdir") - # the global scheme mirrors the distinction between prefix and - # exec-prefix but not the user scheme, so we have to adapt the paths - # before comparing (issue #9100) -@@ -257,8 +258,19 @@ class TestSysConfig(unittest.TestCase): - # before comparing - global_path = global_path.replace(sys.base_prefix, sys.prefix) - base = base.replace(sys.base_prefix, sys.prefix) -+ -+ if platsubdir != "lib": -+ platbase = os.path.join(base, platsubdir) -+ purebase = os.path.join(base, "lib") -+ userlib = os.path.join(user, "lib") -+ # replace platbase first because usually purebase is a prefix of platbase -+ # /usr/lib is prefix of /usr/lib64 and would get replaced first -+ modified_path = global_path.replace(platbase, userlib, 1).replace(purebase, userlib, 1) -+ else: -+ modified_path = global_path.replace(base, user, 1) -+ - user_path = get_path(name, 'posix_user') -- self.assertEqual(user_path, global_path.replace(base, user, 1)) -+ self.assertEqual(user_path, modified_path) - - def test_main(self): - # just making sure _main() runs and returns things in the stdout ---- a/configure -+++ b/configure -@@ -15188,9 +15188,9 @@ fi - - - if test x$PLATFORM_TRIPLET = x; then -- LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}" -+ LIBPL='$(prefix)'"/${platsubdir}/python${VERSION}/config-${LDVERSION}" - else -- LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" -+ LIBPL='$(prefix)'"/${platsubdir}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" - fi - - ---- a/setup.py -+++ b/setup.py -@@ -649,7 +649,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/lib64') -+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') - 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: -@@ -953,11 +953,11 @@ class PyBuildExt(build_ext): - elif curses_library: - readline_libs.append(curses_library) - elif self.compiler.find_library_file(self.lib_dirs + -- ['/usr/lib64/termcap'], -+ ['/usr/lib/termcap'], - 'termcap'): - readline_libs.append('termcap') - self.add(Extension('readline', ['readline.c'], -- library_dirs=['/usr/lib64/termcap'], -+ library_dirs=['/usr/lib/termcap'], - extra_link_args=readline_extra_link_args, - libraries=readline_libs)) - else: ---- a/Lib/test/test_embed.py -+++ b/Lib/test/test_embed.py -@@ -10,6 +10,7 @@ import re - import shutil - import subprocess - import sys -+import sysconfig - import tempfile - import textwrap - -@@ -1070,12 +1071,13 @@ class InitConfigTests(EmbeddingTestsMixi - return config['config']['module_search_paths'] - else: - ver = sys.version_info -+ platsubdir = sysconfig.get_config_var('platsubdir') - return [ - os.path.join(prefix, 'lib', - f'python{ver.major}{ver.minor}.zip'), -- os.path.join(prefix, 'lib', -+ os.path.join(prefix, platsubdir, - f'python{ver.major}.{ver.minor}'), -- os.path.join(exec_prefix, 'lib', -+ os.path.join(exec_prefix, platsubdir, - f'python{ver.major}.{ver.minor}', 'lib-dynload'), - ] - -@@ -1180,13 +1182,15 @@ class InitConfigTests(EmbeddingTestsMixi - def test_init_pyvenv_cfg(self): - # Test path configuration with pyvenv.cfg configuration file - -+ platsubdir = sysconfig.get_config_var('platsubdir') -+ - with self.tmpdir_with_python() as tmpdir, \ - tempfile.TemporaryDirectory() as pyvenv_home: - ver = sys.version_info - - if not MS_WINDOWS: - lib_dynload = os.path.join(pyvenv_home, -- 'lib', -+ platsubdir, - f'python{ver.major}.{ver.minor}', - 'lib-dynload') - os.makedirs(lib_dynload) diff --git a/baselibs.conf b/baselibs.conf index 45da3e6..8522338 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,3 +1,3 @@ -python38-base -python38 -libpython3_8-1_0 +python39-base +python39 +libpython3_9-1_0 diff --git a/bpo-31046_ensurepip_honours_prefix.patch b/bpo-31046_ensurepip_honours_prefix.patch index 4ee1a3c..db2ec11 100644 --- a/bpo-31046_ensurepip_honours_prefix.patch +++ b/bpo-31046_ensurepip_honours_prefix.patch @@ -55,7 +55,7 @@ Co-Authored-By: Xavier de Gaye .. note:: --- a/Lib/ensurepip/__init__.py +++ b/Lib/ensurepip/__init__.py -@@ -46,27 +46,27 @@ def _disable_pip_configuration_settings( +@@ -59,27 +59,27 @@ def _disable_pip_configuration_settings( os.environ['PIP_CONFIG_FILE'] = os.devnull @@ -88,8 +88,8 @@ Co-Authored-By: Xavier de Gaye Note that calling this function will alter both sys.path and os.environ. """ -@@ -109,6 +109,8 @@ def _bootstrap(*, root=None, upgrade=Fal - args = ["install", "--no-index", "--find-links", tmpdir] +@@ -122,6 +122,8 @@ def _bootstrap(*, root=None, upgrade=Fal + args = ["install", "--no-cache-dir", "--no-index", "--find-links", tmpdir] if root: args += ["--root", root] + if prefix: @@ -97,7 +97,7 @@ Co-Authored-By: Xavier de Gaye if upgrade: args += ["--upgrade"] if user: -@@ -181,6 +183,11 @@ def _main(argv=None): +@@ -194,6 +196,11 @@ def _main(argv=None): help="Install everything relative to this alternate root directory.", ) parser.add_argument( @@ -109,7 +109,7 @@ Co-Authored-By: Xavier de Gaye "--altinstall", action="store_true", default=False, -@@ -199,6 +206,7 @@ def _main(argv=None): +@@ -212,6 +219,7 @@ def _main(argv=None): return _bootstrap( root=args.root, @@ -139,7 +139,7 @@ Co-Authored-By: Xavier de Gaye --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1188,7 +1188,7 @@ install: @FRAMEWORKINSTALLFIRST@ commoni +@@ -1244,7 +1244,7 @@ install: @FRAMEWORKINSTALLFIRST@ commoni install|*) ensurepip="" ;; \ esac; \ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ @@ -148,7 +148,7 @@ Co-Authored-By: Xavier de Gaye fi altinstall: commoninstall -@@ -1198,7 +1198,7 @@ altinstall: commoninstall +@@ -1254,7 +1254,7 @@ altinstall: commoninstall install|*) ensurepip="--altinstall" ;; \ esac; \ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ diff --git a/bpo34022-stop_hash-based_invalidation_w_SOURCE_DATE_EPOCH.patch b/bpo34022-stop_hash-based_invalidation_w_SOURCE_DATE_EPOCH.patch index b92feba..ac42871 100644 --- a/bpo34022-stop_hash-based_invalidation_w_SOURCE_DATE_EPOCH.patch +++ b/bpo34022-stop_hash-based_invalidation_w_SOURCE_DATE_EPOCH.patch @@ -48,7 +48,7 @@ subsequent commits. --- a/Lib/test/test_compileall.py +++ b/Lib/test/test_compileall.py -@@ -209,6 +209,21 @@ class CompileallTestsWithoutSourceEpoch( +@@ -396,6 +396,21 @@ class CompileallTestsWithoutSourceEpoch( pass @@ -70,28 +70,6 @@ subsequent commits. class EncodingTest(unittest.TestCase): """Issue 6716: compileall should escape source code when printing errors to stdout.""" -@@ -579,6 +594,21 @@ class CommandLineTestsBase: - - - class CommmandLineTestsWithSourceEpoch(CommandLineTestsBase, -+ unittest.TestCase, -+ metaclass=SourceDateEpochTestMeta, -+ source_date_epoch=True): -+ pass -+ -+ -+class CommmandLineTestsNoSourceEpoch(CommandLineTestsBase, -+ unittest.TestCase, -+ metaclass=SourceDateEpochTestMeta, -+ source_date_epoch=False): -+ pass -+ -+ -+ -+class CommmandLineTestsWithSourceEpoch(CommandLineTestsBase, - unittest.TestCase, - metaclass=SourceDateEpochTestMeta, - source_date_epoch=True): --- a/Lib/test/test_importlib/source/test_file_loader.py +++ b/Lib/test/test_importlib/source/test_file_loader.py @@ -22,6 +22,9 @@ from test.support import make_legacy_pyc diff --git a/bpo36302-sort-module-sources.patch b/bpo36302-sort-module-sources.patch deleted file mode 100644 index 1c35890..0000000 --- a/bpo36302-sort-module-sources.patch +++ /dev/null @@ -1,49 +0,0 @@ -From ca04974425c84f306ddcebe88d6b31442e34e89d Mon Sep 17 00:00:00 2001 -From: "Bernhard M. Wiedemann" -Date: Mon, 5 Jun 2017 17:33:33 +0200 -Subject: [PATCH] bpo-36302: Sort list of sources - -when building packages (e.g. for openSUSE Linux) -(random) filesystem order of input files -influences ordering of functions in the output .so files. -Thus without the patch, builds (in disposable VMs) would usually differ. - -Without this patch, all callers have to be patched individually -https://github.com/dugsong/libdnet/pull/42 -https://github.com/sass/libsass-python/pull/212 -https://github.com/tahoe-lafs/pycryptopp/pull/41 -https://github.com/yt-project/yt/pull/2206 -https://github.com/pyproj4/pyproj/pull/142 -https://github.com/pytries/datrie/pull/49 -https://github.com/Roche/pyreadstat/pull/37 -but that is an infinite effort. - -See https://reproducible-builds.org/ for why this matters. ---- - Lib/distutils/command/build_ext.py | 3 ++- - .../next/Library/2019-03-21-19-23-46.bpo-36302.Yc591g.rst | 2 ++ - 2 files changed, 4 insertions(+), 1 deletion(-) - create mode 100644 Misc/NEWS.d/next/Library/2019-03-21-19-23-46.bpo-36302.Yc591g.rst - -diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py -index 2d7cdf063f01..38bb8fd93c27 100644 ---- a/Lib/distutils/command/build_ext.py -+++ b/Lib/distutils/command/build_ext.py -@@ -490,7 +490,8 @@ def build_extension(self, ext): - "in 'ext_modules' option (extension '%s'), " - "'sources' must be present and must be " - "a list of source filenames" % ext.name) -- sources = list(sources) -+ # sort to make the resulting .so file build reproducible -+ sources = sorted(sources) - - ext_path = self.get_ext_fullpath(ext.name) - depends = sources + ext.depends -diff --git a/Misc/NEWS.d/next/Library/2019-03-21-19-23-46.bpo-36302.Yc591g.rst b/Misc/NEWS.d/next/Library/2019-03-21-19-23-46.bpo-36302.Yc591g.rst -new file mode 100644 -index 000000000000..fe01b5915d5d ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2019-03-21-19-23-46.bpo-36302.Yc591g.rst -@@ -0,0 +1,2 @@ -+distutils sorts source file lists so that Extension .so files -+build more reproducibly by default diff --git a/bpo40784-Fix-sqlite3-deterministic-test.patch b/bpo40784-Fix-sqlite3-deterministic-test.patch deleted file mode 100644 index bf49d78..0000000 --- a/bpo40784-Fix-sqlite3-deterministic-test.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 00a240bf7f95bbd220f1cfbf9eb58484a5f9681a Mon Sep 17 00:00:00 2001 -From: "Miss Islington (bot)" - <31488909+miss-islington@users.noreply.github.com> -Date: Fri, 29 May 2020 05:46:34 -0700 -Subject: [PATCH] bpo-40784: Fix sqlite3 deterministic test (GH-20448) - -(cherry picked from commit c610d970f5373b143bf5f5900d4645e6a90fb460) - -Co-authored-by: Erlend Egeberg Aasland ---- - Lib/sqlite3/test/userfunctions.py | 36 +++++++++++++++++++++++-------- - 1 file changed, 27 insertions(+), 9 deletions(-) - -diff --git a/Lib/sqlite3/test/userfunctions.py b/Lib/sqlite3/test/userfunctions.py -index 9501f535c4999..c11c82e127577 100644 ---- a/Lib/sqlite3/test/userfunctions.py -+++ b/Lib/sqlite3/test/userfunctions.py -@@ -1,8 +1,7 @@ --#-*- coding: iso-8859-1 -*- - # pysqlite2/test/userfunctions.py: tests for user-defined functions and - # aggregates. - # --# Copyright (C) 2005-2007 Gerhard Häring -+# Copyright (C) 2005-2007 Gerhard Häring - # - # This file is part of pysqlite. - # -@@ -158,6 +157,7 @@ def setUp(self): - self.con.create_function("isblob", 1, func_isblob) - self.con.create_function("islonglong", 1, func_islonglong) - self.con.create_function("spam", -1, func) -+ self.con.execute("create table test(t text)") - - def tearDown(self): - self.con.close() -@@ -276,18 +276,36 @@ def CheckAnyArguments(self): - val = cur.fetchone()[0] - self.assertEqual(val, 2) - -+ # Regarding deterministic functions: -+ # -+ # Between 3.8.3 and 3.15.0, deterministic functions were only used to -+ # optimize inner loops, so for those versions we can only test if the -+ # sqlite machinery has factored out a call or not. From 3.15.0 and onward, -+ # deterministic functions were permitted in WHERE clauses of partial -+ # indices, which allows testing based on syntax, iso. the query optimizer. -+ @unittest.skipIf(sqlite.sqlite_version_info < (3, 8, 3), "Requires SQLite 3.8.3 or higher") - def CheckFuncNonDeterministic(self): - mock = unittest.mock.Mock(return_value=None) -- self.con.create_function("deterministic", 0, mock, deterministic=False) -- self.con.execute("select deterministic() = deterministic()") -- self.assertEqual(mock.call_count, 2) -- -- @unittest.skipIf(sqlite.sqlite_version_info < (3, 8, 3), "deterministic parameter not supported") -+ self.con.create_function("nondeterministic", 0, mock, deterministic=False) -+ if sqlite.sqlite_version_info < (3, 15, 0): -+ self.con.execute("select nondeterministic() = nondeterministic()") -+ self.assertEqual(mock.call_count, 2) -+ else: -+ with self.assertRaises(sqlite.OperationalError): -+ self.con.execute("create index t on test(t) where nondeterministic() is not null") -+ -+ @unittest.skipIf(sqlite.sqlite_version_info < (3, 8, 3), "Requires SQLite 3.8.3 or higher") - def CheckFuncDeterministic(self): - mock = unittest.mock.Mock(return_value=None) - self.con.create_function("deterministic", 0, mock, deterministic=True) -- self.con.execute("select deterministic() = deterministic()") -- self.assertEqual(mock.call_count, 1) -+ if sqlite.sqlite_version_info < (3, 15, 0): -+ self.con.execute("select deterministic() = deterministic()") -+ self.assertEqual(mock.call_count, 1) -+ else: -+ try: -+ self.con.execute("create index t on test(t) where deterministic() is not null") -+ except sqlite.OperationalError: -+ self.fail("Unexpected failure while creating partial index") - - @unittest.skipIf(sqlite.sqlite_version_info >= (3, 8, 3), "SQLite < 3.8.3 needed") - def CheckFuncDeterministicNotSupported(self): diff --git a/bsc1167501-invalid-alignment.patch b/bsc1167501-invalid-alignment.patch index cb98030..8752a6e 100644 --- a/bsc1167501-invalid-alignment.patch +++ b/bsc1167501-invalid-alignment.patch @@ -23,53 +23,54 @@ Signed-off-by: Andreas Schneider --- a/Include/cpython/abstract.h +++ b/Include/cpython/abstract.h -@@ -82,14 +82,17 @@ _PyVectorcall_Function(PyObject *callabl +@@ -67,7 +67,10 @@ PyVectorcall_Function(PyObject *callable { - PyTypeObject *tp = Py_TYPE(callable); - Py_ssize_t offset = tp->tp_vectorcall_offset; + PyTypeObject *tp; + Py_ssize_t offset; - vectorcallfunc *ptr; + union { + char *data; + vectorcallfunc *ptr; + } vc; - if (!PyType_HasFeature(tp, _Py_TPFLAGS_HAVE_VECTORCALL)) { - return NULL; - } + + assert(callable != NULL); + tp = Py_TYPE(callable); +@@ -77,8 +80,8 @@ PyVectorcall_Function(PyObject *callable assert(PyCallable_Check(callable)); + offset = tp->tp_vectorcall_offset; assert(offset > 0); -- ptr = (vectorcallfunc*)(((char *)callable) + offset); +- ptr = (vectorcallfunc *)(((char *)callable) + offset); - return *ptr; + vc.data = (char *)callable + offset; + return *vc.ptr; } /* Call the callable object 'callable' with the "vectorcall" calling ---- /dev/null -+++ b/Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst -@@ -0,0 +1 @@ -+Fix an alignment build warning/error in function ``PyVectorcall_Function()`` publicly exposed by ``abstract.h``. -\ No newline at end of file --- a/Objects/call.c +++ b/Objects/call.c -@@ -173,6 +173,11 @@ _PyObject_MakeTpCall(PyObject *callable, - PyObject * +@@ -205,6 +205,10 @@ PyObject * PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *kwargs) { + PyThreadState *tstate = _PyThreadState_GET(); + union { + char *data; + vectorcallfunc *ptr; + } vc; -+ - /* get vectorcallfunc as in _PyVectorcall_Function, but without - * the _Py_TPFLAGS_HAVE_VECTORCALL check */ - Py_ssize_t offset = Py_TYPE(callable)->tp_vectorcall_offset; -@@ -181,7 +186,8 @@ PyVectorcall_Call(PyObject *callable, Py - Py_TYPE(callable)->tp_name); + + /* get vectorcallfunc as in PyVectorcall_Function, but without + * the Py_TPFLAGS_HAVE_VECTORCALL check */ +@@ -215,7 +219,8 @@ PyVectorcall_Call(PyObject *callable, Py + Py_TYPE(callable)->tp_name); return NULL; } - vectorcallfunc func = *(vectorcallfunc *)(((char *)callable) + offset); + vc.data = (char *)callable + offset; + vectorcallfunc func = *vc.ptr; if (func == NULL) { - PyErr_Format(PyExc_TypeError, "'%.200s' object does not support vectorcall", - Py_TYPE(callable)->tp_name); + _PyErr_Format(tstate, PyExc_TypeError, + "'%.200s' object does not support vectorcall", +--- /dev/null ++++ b/Misc/NEWS.d/next/C +@@ -0,0 +1 @@ ++Fix an alignment build warning/error in function ``PyVectorcall_Function()`` publicly exposed by ``abstract.h``. +\ No newline at end of file diff --git a/distutils-reproducible-compile.patch b/distutils-reproducible-compile.patch index f290b8e..4ec5773 100644 --- a/distutils-reproducible-compile.patch +++ b/distutils-reproducible-compile.patch @@ -1,6 +1,6 @@ --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py -@@ -432,7 +432,7 @@ byte_compile(files, optimize=%r, force=% +@@ -433,7 +433,7 @@ byte_compile(files, optimize=%r, force=% else: from py_compile import compile diff --git a/python-3.3.0b1-fix_date_time_compiler.patch b/python-3.3.0b1-fix_date_time_compiler.patch index 4a7f4a8..6cc43a7 100644 --- a/python-3.3.0b1-fix_date_time_compiler.patch +++ b/python-3.3.0b1-fix_date_time_compiler.patch @@ -1,6 +1,6 @@ --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -746,11 +746,18 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ +@@ -764,11 +764,18 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ $(DTRACE_OBJS) \ $(srcdir)/Modules/getbuildinfo.c $(CC) -c $(PY_CORE_CFLAGS) \ diff --git a/python38.changes b/python39.changes similarity index 99% rename from python38.changes rename to python39.changes index d1608e6..d23a15f 100644 --- a/python38.changes +++ b/python39.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Jul 14 20:45:11 UTC 2020 - Matej Cepl + +- Update to 3.9.0b4: +- Remove upstreamed patches: + - F00102-lib64.patch + - SUSE-FEDORA-multilib.patch + - OBS_dev-shm.patch + - subprocess-raise-timeout.patch + - bpo36302-sort-module-sources.patch + - bpo40784-Fix-sqlite3-deterministic-test.patch + ------------------------------------------------------------------- Fri Jul 10 10:55:15 UTC 2020 - Tomáš Chvátal diff --git a/python38.spec b/python39.spec similarity index 95% rename from python38.spec rename to python39.spec index be30d99..980710d 100644 --- a/python38.spec +++ b/python39.spec @@ -41,8 +41,8 @@ # the versions are autogenerated from pre_checkin.sh # based on the current source tarball %define python_version_abitag %(c=%{python_version}; echo ${c//./}) -# FIXME %%define python_version_soname %%(c=%%{python_version}; echo ${c//./_}) -%define python_version_soname 3_8 +# FIXME %define python_version_soname %(c=%{python_version}; echo ${c//./_}) +%define python_version_soname 3_9 %if 0%(test -n "%{tar_suffix}" && echo 1) %define _version %(echo "%{_version}~%{tar_suffix}") %define tarversion %{version} @@ -53,7 +53,7 @@ # Will provide the pyton3-* provides # Will do the /usr/bin/python3 and all the core links %define primary_interpreter 1 -%define folderversion %{tarversion} +%define folderversion %{_version} %define tarname Python-%{tarversion} %define sitedir %{_libdir}/python%{python_version} # three possible ABI kinds: m - pymalloc, d - debug build; see PEP 3149 @@ -87,7 +87,7 @@ %bcond_without profileopt %endif Name: %{python_pkg_name}%{psuffix} -Version: 3.8.3 +Version: 3.9.0b4 Release: 0 Summary: Python 3 Interpreter License: Python-2.0 @@ -108,10 +108,6 @@ Source99: python.keyring # They are listed here to work around missing functionality in rpmbuild, # which would otherwise exclude them from distributed src.rpm files. Source100: PACKAGING-NOTES -# First series of patches supportin lib-vs-lib64 distinction -# PATCH-FEATURE-UPSTREAM F00102-lib64.patch bsc#[0-9]+ mcepl@suse.com -# Change the various install paths to use /usr/lib64/ instead or /usr/lib/ -Patch01: F00102-lib64.patch # PATCH-FEATURE-UPSTREAM F00251-change-user-install-location.patch bsc#[0-9]+ mcepl@suse.com # Fix installation in /usr/local (boo#1071941), originally from Fedora # https://src.fedoraproject.org/rpms/python3/blob/master/f/00251-change-user-install-location.patch @@ -119,13 +115,6 @@ Patch01: F00102-lib64.patch # to /usr/local if executable is /usr/bin/python* and RPM build # is not detected to make pip and distutils install into separate location Patch02: F00251-change-user-install-location.patch -# PATCH-FEATURE-UPSTREAM SUSE-FEDORA-multilib.patch bsc#[0-9]+ mcepl@suse.com -# Add support for platlib variable -Patch03: SUSE-FEDORA-multilib.patch -# PATCH-FIX-OPENSUSE OBS_dev-shm.patch bpo#38377 mcepl@suse.com -# _multiprocessing.SemLock depends on proper /dev/shm which is not available in OBS -Patch04: OBS_dev-shm.patch -# # PATCH-FEATURE-UPSTREAM distutils-reproducible-compile.patch gh#python/cpython#8057 mcepl@suse.com # Improve reproduceability Patch06: distutils-reproducible-compile.patch @@ -135,8 +124,6 @@ Patch07: python-3.3.0b1-localpath.patch Patch08: python-3.3.0b1-fix_date_time_compiler.patch # POSIX_FADV_WILLNEED throws EINVAL. Use a different constant in test Patch09: python-3.3.0b1-test-posix_fadvise.patch -# Raise timeout value for test_subprocess -Patch15: subprocess-raise-timeout.patch # skip some tests only for PowerPC Patch23: skip_random_failing_tests.patch # Fix SOURCE_DATE_EPOCH problems (bpo#34022, bpo#29708) @@ -147,18 +134,12 @@ Patch25: python3-imp-returntype.patch # https://github.com/python/cpython/pull/11569 # Fix segfault in ssl's cert parser Patch27: CVE-2019-5010-null-defer-x509-cert-DOS.patch -# PATCH-FIX-UPSTREAM bpo36302-sort-module-sources.patch bsc#1041090 bwiedemann@suse.com -# Sort list of sources to have stable order in the compiled .so library. -Patch28: bpo36302-sort-module-sources.patch # PATCH-FEATURE-UPSTREAM bpo-31046_ensurepip_honours_prefix.patch bpo#31046 mcepl@suse.com # ensurepip should honour the value of $(prefix) Patch29: bpo-31046_ensurepip_honours_prefix.patch # PATCH-FIX-UPSTREAM bsc1167501-invalid-alignment.patch gh#python/cpython#19133 mcepl@suse.com # Fix wrong misalignment of pointer to vectorcallfunc Patch31: bsc1167501-invalid-alignment.patch -# PATCH-FIX-UPSTREAM bpo40784-Fix-sqlite3-deterministic-test.patch bpo#40784 Andreas.Stieger@gmx.de -# Fix tests with SQLite 3.32 -Patch32: bpo40784-Fix-sqlite3-deterministic-test.patch BuildRequires: automake BuildRequires: fdupes BuildRequires: gmp-devel @@ -392,31 +373,20 @@ other applications. %prep %setup -q -n %{tarname} -%if "%{_lib}" == "lib64" -%patch01 -p1 -%endif %patch02 -p1 -%if "%{_lib}" == "lib64" -%patch03 -p1 -%endif -%patch04 -p1 %patch06 -p1 %patch07 -p1 %patch08 -p1 %patch09 -p1 -# %%patch12 -p1 -%patch15 -p1 %ifarch ppc ppc64 ppc64le %patch23 -p1 %endif %patch24 -p1 %patch25 -p1 %patch27 -p1 -%patch28 -p1 %patch29 -p1 %patch31 -p1 -%patch32 -p1 # drop Autoconf version requirement sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac @@ -424,7 +394,7 @@ sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac # fix shebangs - convert /usr/local/bin/python and /usr/bin/env/python to /usr/bin/python3 for dir in Lib Tools; do # find *.py, filter to files that contain bad shebangs - # break up "/""usr" like this to prevent replacing with %%{_prefix} + # break up "/""usr" like this to prevent replacing with %{_prefix} find $dir -name '*.py' -type f -print0 \ | xargs -0 grep -lE '^#! *(/''usr/.*bin/(env +)?)?python' \ | xargs sed -r -i -e '1s@^#![[:space:]]*(/''usr/(local/)?bin/(env +)?)?python([0-9]+(\.[0-9]+)?)?@#!%{_bindir}/python3@' @@ -439,7 +409,7 @@ rm Lib/site-packages/README.txt %build %if %{with doc} -TODAY_DATE=`date -r %{SOURCE0} "+%%B %%d, %%Y"` +TODAY_DATE=`date -r %{SOURCE0} "+%B %d, %Y"` # TODO use not date of tarball but date of latest patch cd Doc @@ -967,7 +937,7 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo %{_bindir}/pydoc3 # executables %attr(755, root, root) %{_bindir}/pydoc%{python_version} -# %%attr(755, root, root) %%{_bindir}/python%%{python_abi} +# %attr(755, root, root) %{_bindir}/python%{python_abi} %attr(755, root, root) %{_bindir}/python%{python_version} # endif for if base %endif diff --git a/subprocess-raise-timeout.patch b/subprocess-raise-timeout.patch deleted file mode 100644 index 98d751e..0000000 --- a/subprocess-raise-timeout.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/Lib/test/test_subprocess.py -+++ b/Lib/test/test_subprocess.py -@@ -1124,7 +1124,8 @@ class ProcessTestCase(BaseTestCase): - self.assertIn("0.0001", str(c.exception)) # For coverage of __str__. - # Some heavily loaded buildbots (sparc Debian 3.x) require this much - # time to start. -- self.assertEqual(p.wait(timeout=3), 0) -+ # OBS might require even more -+ self.assertEqual(p.wait(timeout=10), 0) - - def test_invalid_bufsize(self): - # an invalid type of the bufsize argument should raise