From: Jeffery To Date: Tue, 28 Dec 2021 09:11:24 +0000 (+0800) Subject: python3: Update to 3.10.1, refresh/remove patches X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=d63664a5e7dac270abc28d88eb060f0dca4f3f2f;p=feed%2Fpackages.git python3: Update to 3.10.1, refresh/remove patches Removed patches: * 027-bpo-43158-Use-configure-values-for-building-_uuid-ex.patch Already merged. * 029-disable-deprecation-warning.patch Packages should be patched/fixed to remove the use of distutils instead of disabling this warning. Also: * Updates PKG_LICENSE to use the correct SPDX license identifier * Fixes build for mipsel_24kc_24kf Fixes https://github.com/openwrt/packages/issues/17217. Signed-off-by: Jeffery To --- diff --git a/lang/python/python3-version.mk b/lang/python/python3-version.mk index ec09b14e78..d85154de57 100644 --- a/lang/python/python3-version.mk +++ b/lang/python/python3-version.mk @@ -8,12 +8,12 @@ # Note: keep in sync with setuptools & pip PYTHON3_VERSION_MAJOR:=3 PYTHON3_VERSION_MINOR:=10 -PYTHON3_VERSION_MICRO:=0 +PYTHON3_VERSION_MICRO:=1 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) PYTHON3_SETUPTOOLS_PKG_RELEASE:=1 PYTHON3_PIP_PKG_RELEASE:=1 -PYTHON3_SETUPTOOLS_VERSION:=57.4.0 -PYTHON3_PIP_VERSION:=21.2.3 +PYTHON3_SETUPTOOLS_VERSION:=58.1.0 +PYTHON3_PIP_VERSION:=21.2.4 diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index af20a88000..1d6c021db8 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -17,10 +17,10 @@ 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) # FIXME: if updating, get rid of [1] & [2] asap -PKG_HASH:=5a99f8e7a6a11a7b98b4e75e0d1303d3832cada5534068f69c7b6222a7b1b002 +PKG_HASH:=a7f1265b6e1a5de1ec5c3ec7019ab53413469934758311e9d240c46e5ae6e177 PKG_MAINTAINER:=Jeffery To -PKG_LICENSE:=Python/2.0 +PKG_LICENSE:=PSF-2.0 PKG_LICENSE_FILES:=LICENSE Doc/copyright.rst Doc/license.rst Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi_osx/LICENSE Modules/expat/COPYING PKG_CPE_ID:=cpe:/a:python:python @@ -140,6 +140,15 @@ EXTRA_LDFLAGS+= \ -L$(PKG_BUILD_DIR) \ -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib +# Workaround for hardfloat mips +# https://bugs.python.org/issue46265 +ifneq ($(findstring mips,$(CONFIG_ARCH)),) +ifeq ($(CONFIG_HAS_FPU),y) +CONFIGURE_VARS += \ + ax_cv_check_cflags___fno_semantic_interposition=no +endif +endif + MAKE_VARS += \ PYTHONSTRICTEXTENSIONBUILD=1 diff --git a/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch b/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch index 76c8f8c9cc..128a9ba63c 100644 --- a/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch +++ b/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch @@ -1,6 +1,6 @@ --- a/setup.py +++ b/setup.py -@@ -816,7 +816,8 @@ class PyBuildExt(build_ext): +@@ -830,7 +830,8 @@ class PyBuildExt(build_ext): # only change this for cross builds for 3.3, issues on Mageia if CROSS_COMPILING: self.add_cross_compiling_paths() diff --git a/lang/python/python3/patches/014-remove-platform-so-suffix.patch b/lang/python/python3/patches/014-remove-platform-so-suffix.patch index db9c3f3992..f56711115d 100644 --- a/lang/python/python3/patches/014-remove-platform-so-suffix.patch +++ b/lang/python/python3/patches/014-remove-platform-so-suffix.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -15407,7 +15407,7 @@ $as_echo_n "checking ABIFLAGS... " >&6; +@@ -15638,7 +15638,7 @@ $as_echo_n "checking ABIFLAGS... " >&6; $as_echo "$ABIFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 $as_echo_n "checking SOABI... " >&6; } @@ -11,7 +11,7 @@ --- a/configure.ac +++ b/configure.ac -@@ -4798,7 +4798,7 @@ AC_SUBST(SOABI) +@@ -4820,7 +4820,7 @@ AC_SUBST(SOABI) AC_MSG_CHECKING(ABIFLAGS) AC_MSG_RESULT($ABIFLAGS) AC_MSG_CHECKING(SOABI) diff --git a/lang/python/python3/patches/016-adjust-config-paths.patch b/lang/python/python3/patches/016-adjust-config-paths.patch index c6583bea98..c16229e518 100644 --- a/lang/python/python3/patches/016-adjust-config-paths.patch +++ b/lang/python/python3/patches/016-adjust-config-paths.patch @@ -10,7 +10,7 @@ '_PYTHON_SYSCONFIGDATA_NAME', --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1594,7 +1594,7 @@ libinstall: build_all $(srcdir)/Modules/ +@@ -1593,7 +1593,7 @@ libinstall: build_all $(srcdir)/Modules/ esac; \ done; \ done @@ -19,7 +19,7 @@ $(DESTDIR)$(LIBDEST); \ $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ -@@ -1752,7 +1752,7 @@ sharedinstall: sharedmods +@@ -1751,7 +1751,7 @@ sharedinstall: sharedmods --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ --root=$(DESTDIR)/ @@ -30,7 +30,7 @@ # Here are a couple of targets for MacOSX again, to install a full --- a/configure +++ b/configure -@@ -3009,7 +3009,7 @@ $as_echo_n "checking for python interpre +@@ -3019,7 +3019,7 @@ $as_echo_n "checking for python interpre fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5 $as_echo "$interp" >&6; } @@ -39,7 +39,7 @@ fi elif test "$cross_compiling" = maybe; then as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5 -@@ -15477,7 +15477,7 @@ fi +@@ -15708,7 +15708,7 @@ fi @@ -59,7 +59,7 @@ fi elif test "$cross_compiling" = maybe; then AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) -@@ -4856,7 +4856,7 @@ fi], +@@ -4878,7 +4878,7 @@ fi], dnl define LIBPL after ABIFLAGS and LDVERSION is defined. AC_SUBST(PY_ENABLE_SHARED) 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 7b9ee1e6b3..b5a278d8e8 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 -@@ -1644,7 +1644,7 @@ python-config: $(srcdir)/Misc/python-con +@@ -1643,7 +1643,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-bpo-43158-Use-configure-values-for-building-_uuid-ex.patch b/lang/python/python3/patches/027-bpo-43158-Use-configure-values-for-building-_uuid-ex.patch deleted file mode 100644 index c58e10537a..0000000000 --- a/lang/python/python3/patches/027-bpo-43158-Use-configure-values-for-building-_uuid-ex.patch +++ /dev/null @@ -1,151 +0,0 @@ -From bab9f2f21b6b27563fe53ae30ba4bf05934ed6f9 Mon Sep 17 00:00:00 2001 -From: Christian Heimes -Date: Mon, 1 Nov 2021 12:52:04 +0100 -Subject: [PATCH] bpo-43158: Use configure values for building _uuid extension - -Signed-off-by: Christian Heimes ---- - .../2021-11-01-12-51-46.bpo-43158.fghS6w.rst | 2 + - configure | 69 +++++++++++++++++++ - configure.ac | 7 +- - pyconfig.h.in | 3 + - setup.py | 12 ++-- - 5 files changed, 86 insertions(+), 7 deletions(-) - create mode 100644 Misc/NEWS.d/next/Build/2021-11-01-12-51-46.bpo-43158.fghS6w.rst - ---- /dev/null -+++ b/Misc/NEWS.d/next/Build/2021-11-01-12-51-46.bpo-43158.fghS6w.rst -@@ -0,0 +1,2 @@ -+``setup.py`` now uses values from configure script to build the ``_uuid`` -+extension module. Configure now detects util-linux's ``libuuid``, too. ---- a/configure -+++ b/configure -@@ -10038,6 +10038,75 @@ $as_echo "no" >&6; } - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -+save_LIBS=$LIBS -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate_time_safe" >&5 -+$as_echo_n "checking for library containing uuid_generate_time_safe... " >&6; } -+if ${ac_cv_search_uuid_generate_time_safe+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_func_search_save_LIBS=$LIBS -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char uuid_generate_time_safe (); -+int -+main () -+{ -+return uuid_generate_time_safe (); -+ ; -+ return 0; -+} -+_ACEOF -+for ac_lib in '' uuid; do -+ if test -z "$ac_lib"; then -+ ac_res="none required" -+ else -+ ac_res=-l$ac_lib -+ LIBS="-l$ac_lib $ac_func_search_save_LIBS" -+ fi -+ if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_search_uuid_generate_time_safe=$ac_res -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext -+ if ${ac_cv_search_uuid_generate_time_safe+:} false; then : -+ break -+fi -+done -+if ${ac_cv_search_uuid_generate_time_safe+:} false; then : -+ -+else -+ ac_cv_search_uuid_generate_time_safe=no -+fi -+rm conftest.$ac_ext -+LIBS=$ac_func_search_save_LIBS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate_time_safe" >&5 -+$as_echo "$ac_cv_search_uuid_generate_time_safe" >&6; } -+ac_res=$ac_cv_search_uuid_generate_time_safe -+if test "$ac_res" != no; then : -+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -+ -+ -+$as_echo "#define HAVE_LIBUUID 1" >>confdefs.h -+, -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+fi -+ -+LIBS=$save_LIBS -+ - # AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007) - # FreeBSD and OpenBSD provides support as well - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5 ---- a/configure.ac -+++ b/configure.ac -@@ -2859,8 +2859,13 @@ void *x = uuid_generate_time_safe - [AC_MSG_RESULT(no)] - ) - -+# check for libuuid from util-linux -+save_LIBS=$LIBS -+AC_CHECK_LIB([uuid], [uuid_generate_time]) -+LIBS=$save_LIBS -+ - # AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007) --# FreeBSD and OpenBSD provides support as well -+# FreeBSD and OpenBSD provides support in libc as well. - AC_MSG_CHECKING(for uuid_create) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ - #ifndef uuid_create ---- a/pyconfig.h.in -+++ b/pyconfig.h.in -@@ -628,6 +628,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_LIBUTIL_H - -+/* Define you have libuuid. */ -+#undef HAVE_LIBUUID -+ - /* Define if you have the 'link' function. */ - #undef HAVE_LINK - ---- a/setup.py -+++ b/setup.py -@@ -1850,15 +1850,15 @@ class PyBuildExt(build_ext): - - def detect_uuid(self): - # Build the _uuid module if possible -- uuid_incs = find_file("uuid.h", self.inc_dirs, ["/usr/include/uuid"]) -- if uuid_incs is not None: -- if self.compiler.find_library_file(self.lib_dirs, 'uuid'): -- uuid_libs = ['uuid'] -+ uuid_h = sysconfig.get_config_var("HAVE_UUID_H") -+ uuid_uuid_h = sysconfig.get_config_var("HAVE_UUID_UUID_H") -+ if uuid_h or uuid_uuid_h: -+ if sysconfig.get_config_var("HAVE_LIBUUID"): -+ uuid_libs = ["uuid"] - else: - uuid_libs = [] - self.add(Extension('_uuid', ['_uuidmodule.c'], -- libraries=uuid_libs, -- include_dirs=uuid_incs)) -+ libraries=uuid_libs)) - else: - self.missing.append('_uuid') - diff --git a/lang/python/python3/patches/029-disable-deprecation-warning.patch b/lang/python/python3/patches/029-disable-deprecation-warning.patch deleted file mode 100644 index fd638d4b5a..0000000000 --- a/lang/python/python3/patches/029-disable-deprecation-warning.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Lib/distutils/__init__.py -+++ b/Lib/distutils/__init__.py -@@ -16,5 +16,5 @@ __version__ = sys.version[:sys.version.i - _DEPRECATION_MESSAGE = ("The distutils package is deprecated and slated for " - "removal in Python 3.12. Use setuptools or check " - "PEP 632 for potential alternatives") --warnings.warn(_DEPRECATION_MESSAGE, -- DeprecationWarning, 2) -+#warnings.warn(_DEPRECATION_MESSAGE, -+# DeprecationWarning, 2)