python3: Update to 3.11.3, refresh/redo patches
authorJeffery To <jeffery.to@gmail.com>
Fri, 5 May 2023 09:23:49 +0000 (17:23 +0800)
committerRosen Penev <rosenp@gmail.com>
Wed, 24 May 2023 03:04:33 +0000 (06:04 +0300)
* Removed patches:

  * 001-enable-zlib.patch: zlib module should be enabled automatically

  * 007-distutils-do-not-adjust-path.patch: Not necessary since we
    process shebang lines for all scripts (in python3-package.mk)

  * 030-bpo-43112-detect-musl-as-a-separate-SOABI-GH-24502.patch:
    Already merged

* Move configure vars from config.site back into Makefile

  Centralizing all build information into one file makes it easier to
  maintain

* No longer set ac_cv_header_uuid_h=yes as configure should detect
  libuuid

* Order configure args by enable-/disable-/with-/without-, then
  alphabetically

* Set ac_cv_working_openssl_hashlib=yes for host configure to bypass the
  OpenSSL API tests with LibreSSL

* Use the default Host/Compile recipe instead of picking out specific
  targets to make

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
18 files changed:
lang/python/python3-version.mk
lang/python/python3/Makefile
lang/python/python3/files/config.site [deleted file]
lang/python/python3/files/python3-package-ctypes.mk
lang/python/python3/files/python3-package-readline.mk
lang/python/python3/patches-pip/001-pep517-pyc-fix.patch
lang/python/python3/patches/001-enable-zlib.patch [deleted file]
lang/python/python3/patches/003-do-not-run-compileall.patch
lang/python/python3/patches/004-do-not-write-bytes-codes.patch
lang/python/python3/patches/006-do-not-add-multiarch-local-paths.patch
lang/python/python3/patches/007-distutils-do-not-adjust-path.patch [deleted file]
lang/python/python3/patches/008-distutils-use-python-sysroot.patch
lang/python/python3/patches/014-remove-platform-so-suffix.patch
lang/python/python3/patches/016-adjust-config-paths.patch
lang/python/python3/patches/025-choose-python-config-version.patch
lang/python/python3/patches/027-install-python3-symlink-after-stdlib.patch
lang/python/python3/patches/030-bpo-43112-detect-musl-as-a-separate-SOABI-GH-24502.patch [deleted file]
lang/python/python3/patches/131-configure_ac-switch-PLATFORM_TRIPLET-suffix-to-musl.patch

index d8e72df198e5bdbca10be8fdc1c3720e6b19d6a3..08bbe3d9a953b65c60c88a9b6951ab2a89caa474 100644 (file)
@@ -7,13 +7,13 @@
 
 # Note: keep in sync with setuptools & pip
 PYTHON3_VERSION_MAJOR:=3
-PYTHON3_VERSION_MINOR:=10
-PYTHON3_VERSION_MICRO:=7
+PYTHON3_VERSION_MINOR:=11
+PYTHON3_VERSION_MICRO:=3
 
 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
 
 PYTHON3_SETUPTOOLS_PKG_RELEASE:=1
 PYTHON3_PIP_PKG_RELEASE:=1
 
-PYTHON3_SETUPTOOLS_VERSION:=63.2.0
-PYTHON3_PIP_VERSION:=22.2.2
+PYTHON3_SETUPTOOLS_VERSION:=65.5.0
+PYTHON3_PIP_VERSION:=22.3.1
index b1e292cbb3fdcb4712208c6c9c58ec08623a9706..0a3e4cbc5c35770dd55e79ee7615f184ac7ec954 100644 (file)
@@ -11,12 +11,12 @@ include $(TOPDIR)/rules.mk
 include ../python3-version.mk
 
 PKG_NAME:=python3
-PKG_RELEASE:=10
+PKG_RELEASE:=1
 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:=6eed8415b7516fb2f260906db5d48dd4c06acc0cb24a7d6cc15296a604dcdc48
+PKG_HASH:=8a5db99c961a7ecf27c75956189c9602c968751f11dbeae2b900dbff1c085b5e
 
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 PKG_LICENSE:=PSF-2.0
@@ -71,7 +71,7 @@ endef
 define Package/libpython3
 $(call Package/python3/Default)
   TITLE:=Python $(PYTHON3_VERSION) core library
-  DEPENDS:=+libpthread +zlib
+  DEPENDS:=+libpthread
   ABI_VERSION:=$(PYTHON3_VERSION)
 endef
 
@@ -82,7 +82,7 @@ endef
 define Package/python3-base
 $(call Package/python3/Default)
   TITLE:=Python $(PYTHON3_VERSION) interpreter
-  DEPENDS:=+libpthread +zlib +libpython3
+  DEPENDS:=+libpython3
 endef
 
 define Package/python3-base/description
@@ -93,7 +93,7 @@ endef
 define Package/python3-light
 $(call Package/python3/Default)
   TITLE:=Python $(PYTHON3_VERSION) light installation
-  DEPENDS:=+python3-base +libffi +libbz2
+  DEPENDS:=+python3-base +libbz2 +zlib
 endef
 
 define Package/python3-light/config
@@ -147,6 +147,18 @@ EXTRA_LDFLAGS+= \
        -L$(PKG_BUILD_DIR) \
        -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
 
+# Bypass configure tests for cross compilation
+CONFIGURE_VARS += \
+       ac_cv_buggy_getaddrinfo=no \
+       ac_cv_file__dev_ptc=no \
+       ac_cv_file__dev_ptmx=yes
+
+# Disable stdlib modules
+# Check for a better way in the future: https://github.com/python/cpython/issues/98558
+CONFIGURE_VARS += \
+       py_cv_module__tkinter=n/a \
+       py_cv_module_nis=n/a
+
 # Workaround for hardfloat mips
 # https://bugs.python.org/issue46265
 ifneq ($(findstring mips,$(CONFIG_ARCH)),)
@@ -159,22 +171,16 @@ endif
 MAKE_VARS += \
        PYTHONSTRICTEXTENSIONBUILD=1
 
-CONFIGURE_ARGS+= \
+CONFIGURE_ARGS += \
        --enable-optimizations \
        --enable-shared \
+       --disable-test-modules \
+       --with-build-python \
        --with-system-ffi \
        --without-cxx-main \
        --without-ensurepip \
-       --disable-test-modules \
        $(if $(CONFIG_IPV6),--enable-ipv6) \
-       $(if $(findstring mips,$(CONFIG_ARCH)),,--with-lto) \
-       CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
-       OPT="$(TARGET_CFLAGS)"
-
-define Build/Prepare
-       $(call Build/Prepare/Default)
-       $(CP) ./files/config.site $(PKG_BUILD_DIR)/config.site
-endef
+       $(if $(findstring mips,$(CONFIG_ARCH)),,--with-lto)
 
 ifdef CONFIG_PACKAGE_python3-setuptools
 PYTHON3_SETUPTOOLS_BUILD:=1
@@ -333,6 +339,10 @@ endif
 # HOST_MAKE_VARS += \
 #      PYTHONSTRICTEXTENSIONBUILD=1
 
+# Bypass configure test
+HOST_CONFIGURE_VARS += \
+       ac_cv_working_openssl_hashlib=yes
+
 ifeq ($(HOST_OS),Darwin)
 HOST_CONFIGURE_VARS += \
        ac_cv_header_libintl_h=no
@@ -340,25 +350,19 @@ HOST_MAKE_VARS += \
        USE_PYTHON_CONFIG_PY=1
 endif
 
-HOST_CONFIGURE_ARGS+= \
+HOST_CONFIGURE_ARGS += \
        --enable-optimizations \
+       --disable-test-modules \
        --with-ensurepip=upgrade \
-       --with-system-expat=$(STAGING_DIR_HOST) \
        --with-ssl-default-suites=openssl \
-       --without-cxx-main \
-       --disable-test-modules \
-       CONFIG_SITE=
+       --with-system-expat \
+       --without-cxx-main
 
 define Host/Configure
        $(SED) 's/^ENABLE_USER_SITE = None$$$$/ENABLE_USER_SITE = False/' $(HOST_BUILD_DIR)/Lib/site.py
        $(call Host/Configure/Default)
 endef
 
-define Host/Compile
-       $(call Host/Compile/Default,python)
-       $(call Host/Compile/Default,sharedmods)
-endef
-
 define Host/Install
        $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),,
                rm -rf \
diff --git a/lang/python/python3/files/config.site b/lang/python/python3/files/config.site
deleted file mode 100644 (file)
index 65c2d95..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2007-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-ac_cv_file__dev_ptmx=yes
-ac_cv_file__dev_ptc=no
-ac_cv_buggy_getaddrinfo=no
-ac_cv_header_uuid_h=yes
-
index 90e8cefedcfd0b5676d0d2ff31714331cc788dac..e1bac47cdf4110ab34652e4f9c7d672c5e087ce4 100644 (file)
@@ -8,7 +8,7 @@
 define Package/python3-ctypes
 $(call Package/python3/Default)
   TITLE:=Python $(PYTHON3_VERSION) ctypes module
-  DEPENDS:=+python3-light
+  DEPENDS:=+python3-light +libffi
 endef
 
 $(eval $(call Py3BasePackage,python3-ctypes, \
index 4ce408db23507a4e2df08f1dde7770813db36d0f..fbff134a34db53f18f1d7a2bcd98addcef8a075a 100644 (file)
@@ -8,7 +8,7 @@
 define Package/python3-readline
 $(call Package/python3/Default)
   TITLE:=Python $(PYTHON3_VERSION) readline module
-  DEPENDS:=+python3-light +libreadline +libncursesw
+  DEPENDS:=+python3-light +libreadline
 endef
 
 $(eval $(call Py3BasePackage,python3-readline, \
index e600b0a30e4b3b4c04b4e4c0c09ebe5aeeb8ff85..df5f90cce178d0b5f73a2eef36a7e92d7bfb5d57 100644 (file)
@@ -1,16 +1,25 @@
 diff --git a/pip/_vendor/pep517/in_process/__init__.py b/pip/_vendor/pep517/in_process/__init__.py
-index c932313..a01143b 100644
+index 281a356cfe26..77acbfc2670b 100644
 --- a/pip/_vendor/pep517/in_process/__init__.py
 +++ b/pip/_vendor/pep517/in_process/__init__.py
-@@ -10,8 +10,13 @@ try:
-     import importlib.resources as resources
-     def _in_proc_script_path():
--        return resources.path(__package__, '_in_process.py')
-+        if resources.is_resource(__package__, '_in_process.py'):
-+            return resources.path(__package__, '_in_process.py')
-+        return resources.path(__package__, '_in_process.pyc')
+@@ -14,13 +14,21 @@ try:
+     except AttributeError:
+         # Python 3.8 compatibility
+         def _in_proc_script_path():
+-            return resources.path(__package__, '_in_process.py')
++            if resources.is_resource(__package__, '_in_process.py'):
++                return resources.path(__package__, '_in_process.py')
++            return resources.path(__package__, '_in_process.pyc')
+     else:
+         def _in_proc_script_path():
++            if resources.files(__package__).joinpath('_in_process.py').is_file():
++                return resources.as_file(
++                    resources.files(__package__).joinpath('_in_process.py'))
+             return resources.as_file(
+-                resources.files(__package__).joinpath('_in_process.py'))
++                resources.files(__package__).joinpath('_in_process.pyc'))
  except ImportError:
+     # Python 3.6 compatibility
      @contextmanager
      def _in_proc_script_path():
 -        yield pjoin(dirname(abspath(__file__)), '_in_process.py')
diff --git a/lang/python/python3/patches/001-enable-zlib.patch b/lang/python/python3/patches/001-enable-zlib.patch
deleted file mode 100644 (file)
index 75766ee..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Modules/Setup
-+++ b/Modules/Setup
-@@ -343,7 +343,7 @@ _symtable symtablemodule.c
- # Andrew Kuchling's zlib module.
- # This require zlib 1.1.3 (or later).
- # See http://www.gzip.org/zlib/
--#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
-+zlib zlibmodule.c -lz
- # Interface to the Expat XML parser
- # More information on Expat can be found at www.libexpat.org.
index 212b7720a7f4aae5155f9437a48b9420b676642e..9f0067b25900329d67ca44d682e6dee22801ec93 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1600,6 +1600,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -2084,6 +2084,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 \
-@@ -1627,6 +1628,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -2111,6 +2112,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
index 40b4e5b0c4e83a411ebc06ab6709c1413e4e17fd..6f01f9d8e3c0f695014cd6e43b35be69afc1ae98 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Python/initconfig.c
 +++ b/Python/initconfig.c
-@@ -163,7 +163,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo
+@@ -198,7 +198,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 */
index 333370eb8d27c035a63e314a392227052502b6c7..7b35eb7b4b1ab12d7be42381c22cf47f7d23c041 100644 (file)
@@ -1,6 +1,6 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -822,16 +822,9 @@ class PyBuildExt(build_ext):
+@@ -843,16 +843,9 @@ class PyBuildExt(build_ext):
                          add_dir_to_list(dir_list, directory)
  
      def configure_compiler(self):
diff --git a/lang/python/python3/patches/007-distutils-do-not-adjust-path.patch b/lang/python/python3/patches/007-distutils-do-not-adjust-path.patch
deleted file mode 100644 (file)
index d4680ca..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/Lib/distutils/command/build_scripts.py
-+++ b/Lib/distutils/command/build_scripts.py
-@@ -91,6 +91,7 @@ class build_scripts(Command):
-                     adjust = True
-                     post_interp = match.group(1) or b''
-+            adjust = 0
-             if adjust:
-                 log.info("copying and adjusting %s -> %s", script,
-                          self.build_dir)
index 26f22d7df1cf9aadf6f1faa13b3606cb52dbd0ca..c3e85629096e38af13e550834809648b96981959 100644 (file)
@@ -36,7 +36,7 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
                  self.library_dirs.append('.')
 --- a/Lib/sysconfig.py
 +++ b/Lib/sysconfig.py
-@@ -123,10 +123,17 @@ _SCHEME_KEYS = ('stdlib', 'platstdlib',
+@@ -168,10 +168,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]}'
index fc3aadbfca2cfeff7c316c3b65e3fe70236dbf6d..8c23b83f3bcc33603006791b8263508be8970e6a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -15616,7 +15616,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
+@@ -20712,7 +20712,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
-@@ -4824,7 +4824,7 @@ AC_SUBST(SOABI)
+@@ -5684,7 +5684,7 @@ AC_SUBST(SOABI)
  AC_MSG_CHECKING(ABIFLAGS)
  AC_MSG_RESULT($ABIFLAGS)
  AC_MSG_CHECKING(SOABI)
index 6c7e677001b5fdec905f9414cc3791c4fa081205..a8ef48c7eaebddc8d908f8d06509d509066da2c7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Lib/sysconfig.py
 +++ b/Lib/sysconfig.py
-@@ -407,6 +407,7 @@ def get_makefile_filename():
+@@ -461,6 +461,7 @@ def get_makefile_filename():
  
  
  def _get_sysconfigdata_name():
@@ -10,7 +10,7 @@
          '_PYTHON_SYSCONFIGDATA_NAME',
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1593,7 +1593,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -2077,7 +2077,7 @@ libinstall:      all $(srcdir)/Modules/xxmodu
                        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 \
-@@ -1753,7 +1753,7 @@ sharedinstall: sharedmods
+@@ -2239,7 +2239,7 @@ sharedinstall: all
                --install-scripts=$(BINDIR) \
                --install-platlib=$(DESTSHARED) \
                --root=$(DESTDIR)/
  # Here are a couple of targets for MacOSX again, to install a full
 --- a/configure
 +++ b/configure
-@@ -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; }
--      PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
-+      PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata '$interp
+@@ -3262,7 +3262,7 @@ fi
      fi
- elif test "$cross_compiling" = maybe; then
-     as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
-@@ -15686,7 +15686,7 @@ fi
+         ac_cv_prog_PYTHON_FOR_REGEN=$with_build_python
+     PYTHON_FOR_FREEZE="$with_build_python"
+-    PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$with_build_python
++    PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata '$with_build_python
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_build_python" >&5
+ $as_echo "$with_build_python" >&6; }
+@@ -20782,7 +20782,7 @@ fi
  
  
  
    LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
 --- a/configure.ac
 +++ b/configure.ac
-@@ -82,7 +82,7 @@ if test "$cross_compiling" = yes; then
-           AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
-       fi
-         AC_MSG_RESULT($interp)
--      PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
-+      PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata '$interp
-     fi
- elif test "$cross_compiling" = maybe; then
-     AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
-@@ -4882,7 +4882,7 @@ fi],
+@@ -162,7 +162,7 @@ AC_ARG_WITH(
+     dnl Build Python interpreter is used for regeneration and freezing.
+     ac_cv_prog_PYTHON_FOR_REGEN=$with_build_python
+     PYTHON_FOR_FREEZE="$with_build_python"
+-    PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$with_build_python
++    PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata '$with_build_python
+     AC_MSG_RESULT([$with_build_python])
+   ], [
+     AS_VAR_IF([cross_compiling], [yes],
+@@ -5742,7 +5742,7 @@ fi],
  
  dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
  AC_SUBST(PY_ENABLE_SHARED)
index 15cfebd241b9149bb468cff083b5194bf8e292e4..80d9985fb7cf0bf99520261b12aba9f4afd75482 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1645,7 +1645,7 @@ python-config: $(srcdir)/Misc/python-con
+@@ -2129,7 +2129,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).
index efd193a7dcaf4d402685f63d8c3a89690dbc2815..26241d03eafd248d98b7effa49728f1c7e71437f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1361,7 +1361,7 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORK
+@@ -1839,7 +1839,7 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORK
                        $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
        fi
  
diff --git a/lang/python/python3/patches/030-bpo-43112-detect-musl-as-a-separate-SOABI-GH-24502.patch b/lang/python/python3/patches/030-bpo-43112-detect-musl-as-a-separate-SOABI-GH-24502.patch
deleted file mode 100644 (file)
index f22075e..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-From 3f79de7b8411c76a1fcd1ca850ea62500be7a881 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Sat, 29 Jan 2022 00:02:54 +0100
-Subject: [PATCH 1/2] bpo-43112: detect musl as a separate SOABI (GH-24502)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-musl libc and gnu libc are not ABI compatible so we need set different
-SOABI for musl and not simply assume that all linux is linux-gnu.
-
-Replace linux-gnu with the detected os for the build from config.guess
-for linux-musl*.
-
-(cherry picked from commit 1f036ede59e2c4befc07714cf76603c591d5c972)
-Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
----
- Lib/test/test_sysconfig.py                                | 8 ++++----
- .../next/Build/2021-02-10-17-54-04.bpo-43112.H5Lat6.rst   | 1 +
- configure                                                 | 5 +++++
- configure.ac                                              | 5 +++++
- 4 files changed, 15 insertions(+), 4 deletions(-)
- create mode 100644 Misc/NEWS.d/next/Build/2021-02-10-17-54-04.bpo-43112.H5Lat6.rst
-
---- a/Lib/test/test_sysconfig.py
-+++ b/Lib/test/test_sysconfig.py
-@@ -425,11 +425,11 @@ class TestSysConfig(unittest.TestCase):
-             self.assertTrue('linux' in suffix, suffix)
-         if re.match('(i[3-6]86|x86_64)$', machine):
-             if ctypes.sizeof(ctypes.c_char_p()) == 4:
--                self.assertTrue(suffix.endswith('i386-linux-gnu.so') or
--                                suffix.endswith('x86_64-linux-gnux32.so'),
--                                suffix)
-+                expected_suffixes = 'i386-linux-gnu.so', 'x86_64-linux-gnux32.so', 'i386-linux-musl.so'
-             else: # 8 byte pointer size
--                self.assertTrue(suffix.endswith('x86_64-linux-gnu.so'), suffix)
-+                expected_suffixes = 'x86_64-linux-gnu.so', 'x86_64-linux-musl.so'
-+            self.assertTrue(suffix.endswith(expected_suffixes),
-+                            f'unexpected suffix {suffix!r}')
-     @unittest.skipUnless(sys.platform == 'darwin', 'OS X-specific test')
-     def test_osx_ext_suffix(self):
---- /dev/null
-+++ b/Misc/NEWS.d/next/Build/2021-02-10-17-54-04.bpo-43112.H5Lat6.rst
-@@ -0,0 +1 @@
-+Detect musl libc as a separate SOABI (tagged as ``linux-musl``).
-\ No newline at end of file
---- a/configure
-+++ b/configure
-@@ -5376,6 +5376,11 @@ EOF
- if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
-   PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d '      '`
-+  case "$build_os" in
-+  linux-musl*)
-+    PLATFORM_TRIPLET=`echo "$PLATFORM_TRIPLET" | sed 's/linux-gnu/linux-musl/'`
-+    ;;
-+  esac
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
- $as_echo "$PLATFORM_TRIPLET" >&6; }
- else
---- a/configure.ac
-+++ b/configure.ac
-@@ -866,6 +866,11 @@ EOF
- if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
-   PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d '      '`
-+  case "$build_os" in
-+  linux-musl*)
-+    PLATFORM_TRIPLET=`echo "$PLATFORM_TRIPLET" | sed 's/linux-gnu/linux-musl/'`
-+    ;;
-+  esac
-   AC_MSG_RESULT([$PLATFORM_TRIPLET])
- else
-   AC_MSG_RESULT([none])
index dfe8e06fe79c83a7ca15af56f5547c9beed7e422..675682ab4712758343dfc56e5d02f086e541c24e 100644 (file)
@@ -27,7 +27,7 @@ Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
 
 --- a/configure
 +++ b/configure
-@@ -5376,7 +5376,7 @@ EOF
+@@ -6186,7 +6186,7 @@ EOF
  
  if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
    PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d '      '`
@@ -38,7 +38,7 @@ Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
      ;;
 --- a/configure.ac
 +++ b/configure.ac
-@@ -866,7 +866,7 @@ EOF
+@@ -1081,7 +1081,7 @@ EOF
  
  if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
    PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d '      '`