From 49e3c330d4b5e17a740bc51b7ebbb9a42c67e505 Mon Sep 17 00:00:00 2001 From: Sean Khan Date: Thu, 27 Jun 2024 22:06:30 -0400 Subject: [PATCH] python3: Bump version 3.11 to 3.11.9 Also bumps setuptools to version 24.0 Run tested: aarch64, Dynalink DL-WRX36, Master Branch Maintainer: Jeffery To Signed-off-by: Sean Khan --- lang/python/python3-version.mk | 4 +-- lang/python/python3/Makefile | 2 +- .../patches/003-do-not-run-compileall.patch | 4 +-- .../004-do-not-write-bytes-codes.patch | 2 +- ...006-do-not-add-multiarch-local-paths.patch | 2 +- .../python3/patches/010-no-ncursesw.patch | 6 ++-- .../patches/024-musl-find_library.patch | 2 +- .../025-choose-python-config-version.patch | 2 +- .../patches/027-fix-host-build-libressl.patch | 35 +++++++++++++++++++ 9 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 lang/python/python3/patches/027-fix-host-build-libressl.patch diff --git a/lang/python/python3-version.mk b/lang/python/python3-version.mk index 555b1804c0..b61b52992e 100644 --- a/lang/python/python3-version.mk +++ b/lang/python/python3-version.mk @@ -8,7 +8,7 @@ # Note: keep in sync with setuptools & pip PYTHON3_VERSION_MAJOR:=3 PYTHON3_VERSION_MINOR:=11 -PYTHON3_VERSION_MICRO:=7 +PYTHON3_VERSION_MICRO:=9 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) @@ -16,4 +16,4 @@ PYTHON3_SETUPTOOLS_PKG_RELEASE:=2 PYTHON3_PIP_PKG_RELEASE:=1 PYTHON3_SETUPTOOLS_VERSION:=65.5.0 -PYTHON3_PIP_VERSION:=23.2.1 +PYTHON3_PIP_VERSION:=24.0 diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index 9a9e2ce82b..b65ab2ce92 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -16,7 +16,7 @@ PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_HASH:=18e1aa7e66ff3a58423d59ed22815a6954e53342122c45df20c96877c062b9b7 +PKG_HASH:=9b1e896523fc510691126c864406d9360a3d1e986acbda59cda57b5abda45b87 PKG_MAINTAINER:=Jeffery To PKG_LICENSE:=Python-2.0.1 0BSD diff --git a/lang/python/python3/patches/003-do-not-run-compileall.patch b/lang/python/python3/patches/003-do-not-run-compileall.patch index 7c0044ff89..0b154bd7e9 100644 --- a/lang/python/python3/patches/003-do-not-run-compileall.patch +++ b/lang/python/python3/patches/003-do-not-run-compileall.patch @@ -1,6 +1,6 @@ --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2133,6 +2133,7 @@ libinstall: all $(srcdir)/Modules/xxmodu +@@ -2144,6 +2144,7 @@ libinstall: all $(srcdir)/Modules/xxmodu $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ $(DESTDIR)$(LIBDEST)/distutils/tests ; \ fi @@ -8,7 +8,7 @@ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -j0 -d $(LIBDEST) -f \ -@@ -2160,6 +2161,7 @@ libinstall: all $(srcdir)/Modules/xxmodu +@@ -2171,6 +2172,7 @@ libinstall: all $(srcdir)/Modules/xxmodu $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ -j0 -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages diff --git a/lang/python/python3/patches/004-do-not-write-bytes-codes.patch b/lang/python/python3/patches/004-do-not-write-bytes-codes.patch index 6f01f9d8e3..cd5701de22 100644 --- a/lang/python/python3/patches/004-do-not-write-bytes-codes.patch +++ b/lang/python/python3/patches/004-do-not-write-bytes-codes.patch @@ -1,6 +1,6 @@ --- a/Python/initconfig.c +++ b/Python/initconfig.c -@@ -198,7 +198,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo +@@ -178,7 +178,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo int Py_BytesWarningFlag = 0; /* Warn on str(bytes) and str(buffer) */ int Py_FrozenFlag = 0; /* Needed by getpath.c */ int Py_IgnoreEnvironmentFlag = 0; /* e.g. PYTHONPATH, PYTHONHOME */ diff --git a/lang/python/python3/patches/006-do-not-add-multiarch-local-paths.patch b/lang/python/python3/patches/006-do-not-add-multiarch-local-paths.patch index 7b35eb7b4b..7f1224cf5f 100644 --- a/lang/python/python3/patches/006-do-not-add-multiarch-local-paths.patch +++ b/lang/python/python3/patches/006-do-not-add-multiarch-local-paths.patch @@ -1,6 +1,6 @@ --- a/setup.py +++ b/setup.py -@@ -843,16 +843,9 @@ class PyBuildExt(build_ext): +@@ -844,16 +844,9 @@ class PyBuildExt(build_ext): add_dir_to_list(dir_list, directory) def configure_compiler(self): diff --git a/lang/python/python3/patches/010-no-ncursesw.patch b/lang/python/python3/patches/010-no-ncursesw.patch index 137c433527..a3a44818f4 100644 --- a/lang/python/python3/patches/010-no-ncursesw.patch +++ b/lang/python/python3/patches/010-no-ncursesw.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -5839,20 +5839,13 @@ if test "$with_readline" != no; then +@@ -5840,20 +5840,13 @@ if test "$with_readline" != no; then # library. NOTE: Keep the precedence of listed libraries synchronised # with setup.py. AC_MSG_CHECKING([how to link readline libs]) @@ -28,7 +28,7 @@ # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts #AC_SUBST([READLINE_LIBS]) -@@ -5860,8 +5853,6 @@ if test "$with_readline" != no; then +@@ -5861,8 +5854,6 @@ if test "$with_readline" != no; then AC_MSG_RESULT([none]) else AC_MSG_RESULT([$READLINE_LIBS]) @@ -37,7 +37,7 @@ fi fi -@@ -6099,12 +6090,6 @@ then +@@ -6100,12 +6091,6 @@ then [Define if you have struct stat.st_mtimensec]) fi diff --git a/lang/python/python3/patches/024-musl-find_library.patch b/lang/python/python3/patches/024-musl-find_library.patch index f986a7a94a..34da119898 100644 --- a/lang/python/python3/patches/024-musl-find_library.patch +++ b/lang/python/python3/patches/024-musl-find_library.patch @@ -14,7 +14,7 @@ https://git.alpinelinux.org/aports/tree/main/python2/musl-find_library.patch def _is_elf(filename): "Return True if the given file is an ELF file" -@@ -265,6 +267,57 @@ elif os.name == "posix": +@@ -268,6 +270,57 @@ elif os.name == "posix": def find_library(name, is64 = False): return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name)) diff --git a/lang/python/python3/patches/025-choose-python-config-version.patch b/lang/python/python3/patches/025-choose-python-config-version.patch index 3c74874c91..f4e25ed9e1 100644 --- a/lang/python/python3/patches/025-choose-python-config-version.patch +++ b/lang/python/python3/patches/025-choose-python-config-version.patch @@ -1,6 +1,6 @@ --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2178,7 +2178,7 @@ python-config: $(srcdir)/Misc/python-con +@@ -2189,7 +2189,7 @@ python-config: $(srcdir)/Misc/python-con @ # On Darwin, always use the python version of the script, the shell @ # version doesn't use the compiler customizations that are provided @ # in python (_osx_support.py). diff --git a/lang/python/python3/patches/027-fix-host-build-libressl.patch b/lang/python/python3/patches/027-fix-host-build-libressl.patch new file mode 100644 index 0000000000..19f5016e06 --- /dev/null +++ b/lang/python/python3/patches/027-fix-host-build-libressl.patch @@ -0,0 +1,35 @@ +--- a/Modules/_ssl.c ++++ b/Modules/_ssl.c +@@ -4541,7 +4541,7 @@ set_sni_callback(PySSLContext *self, PyO + return 0; + } + +-#if OPENSSL_VERSION_NUMBER < 0x30300000L ++#if OPENSSL_VERSION_NUMBER < 0x30300000L && !defined(LIBRESSL_VERSION_NUMBER) + static X509_OBJECT *x509_object_dup(const X509_OBJECT *obj) + { + int ok; +@@ -4614,7 +4614,11 @@ _ssl__SSLContext_cert_store_stats_impl(P + int x509 = 0, crl = 0, ca = 0, i; + + store = SSL_CTX_get_cert_store(self->ctx); ++#if !defined(LIBRESSL_VERSION_NUMBER) + objs = X509_STORE_get1_objects(store); ++#else ++ objs = X509_STORE_get0_objects(store); ++#endif + if (objs == NULL) { + PyErr_SetString(PyExc_MemoryError, "failed to query cert store"); + return NULL; +@@ -4669,7 +4673,11 @@ _ssl__SSLContext_get_ca_certs_impl(PySSL + } + + store = SSL_CTX_get_cert_store(self->ctx); ++#if !defined(LIBRESSL_VERSION_NUMBER) + objs = X509_STORE_get1_objects(store); ++#else ++ objs = X509_STORE_get0_objects(store); ++#endif + if (objs == NULL) { + PyErr_SetString(PyExc_MemoryError, "failed to query cert store"); + goto error; -- 2.30.2