mirror of
https://github.com/openwrt/packages.git
synced 2025-12-20 17:41:20 +00:00
python3: bump to version 3.10.0
Manually re-applied: 008-distutils-use-python-sysroot.patch 016-adjust-config-paths.patch Drop patch: 003-do-not-run-distutils-tests.patch There is now a configure option '--disable-test-modules' And seems we left the '_ctypes_test' around for quite some time. Dropped now. Refs: https://bugs.python.org/issue27640 https://bugs.python.org/issue43282 Drop patch: 013-getbuildinfo-date-time-source-date-epoch.patch Python build honors SOURCE_DATE_EPOCH pretty well now. Drop setuptools patches. Setuptools should be reproducible with Python 3.6+ according to a mention here: https://github.com/pypa/setuptools/pull/1690#issuecomment-536517456 It's time to let upstream fix Setuptools reproduce-ability. Drop patch: 010-do-not-add-rt-lib-dirs-when-cross-compiling.patch I can't seem to fully remember why it's there. And it seem to build fine without it. Drop patch: 015-abort-on-failed-modules.patch Python build supports a similar PYTHONSTRICTEXTENSIONBUILD=1 env-var option. Add patch: 026-openssl-feature-flags.patch We need to keep this in our tree for a while. See: https://bugs.python.org/issue45627 Backport patch: 027-bpo-43158-Use-configure-values-for-building-_uuid-ex.patch Link: https://github.com/python/cpython/pull/29353 Fixes the build for uuid C module. Add patch: 028-host-python-support-ssl-with-libressl.patch We need the _ssl module working on the host-side with LibreSSL for pip to work to download from https://pypi.org Refs: https://github.com/openwrt/openwrt/pull/4749 Add patch: 029-disable-deprecation-warning.patch Fixes apparmor build. The warning causes a configure error. Refreshed the rest of patches. Some old build-flags were removed. They don't seem to be necessary anymore. Split python3-uuid from python3-light. To better manage the libuuid library (if needed). Also, fixing the uuid C module build. Seems this was failing, and was falling back to using hashlib. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@ third-party Python modules.
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
Lib/distutils/command/build_ext.py | 5 ++++-
|
||||
Lib/distutils/sysconfig.py | 15 +++++++++++----
|
||||
Lib/sysconfig.py | 15 +++++++++++----
|
||||
2 files changed, 15 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/Lib/distutils/command/build_ext.py
|
||||
@@ -34,27 +34,27 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
else:
|
||||
# building python standard extensions
|
||||
self.library_dirs.append('.')
|
||||
--- a/Lib/distutils/sysconfig.py
|
||||
+++ b/Lib/distutils/sysconfig.py
|
||||
@@ -17,10 +17,17 @@ import sys
|
||||
from .errors import DistutilsPlatformError
|
||||
|
||||
# These are needed in a couple of spots, so just compute them once.
|
||||
-PREFIX = os.path.normpath(sys.prefix)
|
||||
-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
|
||||
-BASE_PREFIX = os.path.normpath(sys.base_prefix)
|
||||
-BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
|
||||
--- a/Lib/sysconfig.py
|
||||
+++ b/Lib/sysconfig.py
|
||||
@@ -123,10 +123,17 @@ _SCHEME_KEYS = ('stdlib', 'platstdlib',
|
||||
_PY_VERSION = sys.version.split()[0]
|
||||
_PY_VERSION_SHORT = f'{sys.version_info[0]}.{sys.version_info[1]}'
|
||||
_PY_VERSION_SHORT_NO_DOT = f'{sys.version_info[0]}{sys.version_info[1]}'
|
||||
-_PREFIX = os.path.normpath(sys.prefix)
|
||||
-_BASE_PREFIX = os.path.normpath(sys.base_prefix)
|
||||
-_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
|
||||
-_BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
|
||||
+if "_python_sysroot" in os.environ:
|
||||
+ _sysroot=os.environ.get('_python_sysroot')
|
||||
+ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
|
||||
+ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
|
||||
+ BASE_PREFIX = PREFIX
|
||||
+ BASE_EXEC_PREFIX = EXEC_PREFIX
|
||||
+ _PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
|
||||
+ _EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
|
||||
+ _BASE_PREFIX = _PREFIX
|
||||
+ _BASE_EXEC_PREFIX = _EXEC_PREFIX
|
||||
+else:
|
||||
+ PREFIX = os.path.normpath(sys.prefix)
|
||||
+ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
|
||||
+ BASE_PREFIX = os.path.normpath(sys.base_prefix)
|
||||
+ BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
|
||||
+ _PREFIX = os.path.normpath(sys.prefix)
|
||||
+ _EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
|
||||
+ _BASE_PREFIX = os.path.normpath(sys.base_prefix)
|
||||
+ _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
|
||||
_CONFIG_VARS = None
|
||||
_USER_BASE = None
|
||||
|
||||
# Path to the base directory of the project. On Windows the binary may
|
||||
# live in project/PCbuild/win32 or project/PCbuild/amd64.
|
||||
|
||||
Reference in New Issue
Block a user