From 87631ecdd4ece794ae600d35e259cc1227795313 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 3 Jul 2023 22:34:48 +0800 Subject: [PATCH 1/6] python3: Use regular package recipes for python3 package There is no need to use Py3Package for python3 as it does not package any Python files; it is an empty package with dependencies to install the full Python installation. Signed-off-by: Jeffery To --- lang/python/python3/Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index 58ea2e0e01..0d9e254055 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -264,11 +264,7 @@ define Py3Package/python3-base/install endef Py3Package/python3-light/install:=: -Py3Package/python3/install:=: - -define Py3Package/python3/filespec --|$(PYTHON3_PKG_DIR) -endef +Package/python3/install:=: # libuuid is provided by e2fsprogs and uuid/uuid.h is moved into # $(STAGING_DIR_HOST)/include/e2fsprogs @@ -351,14 +347,13 @@ $(foreach package, $(PYTHON3_PACKAGES), \ ) $(eval $(call BuildPackage,libpython3)) +$(eval $(call BuildPackage,python3)) $(eval $(call Py3Package,python3-base)) $(eval $(call Py3Package,python3-light)) -$(eval $(call Py3Package,python3)) $(eval $(call BuildPackage,python3-base)) $(eval $(call BuildPackage,python3-light)) -$(eval $(call BuildPackage,python3)) $(eval $(call BuildPackage,python3-base-src)) $(eval $(call BuildPackage,python3-light-src)) From 329f9a139157840ad129991e961a63f7f4362d62 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Thu, 13 Jul 2023 13:39:35 +0800 Subject: [PATCH 2/6] python3: Fix package descriptions * Fix default Python package description not included in individual package descriptions * Update default Python package description text (from General Python FAQ, "What is Python?") * Add package descriptions for Python module packages * Reduce duplication in package titles Signed-off-by: Jeffery To --- lang/python/python3/Makefile | 48 ++++++++++++------- .../python3/files/python3-package-asyncio.mk | 8 +++- .../python3/files/python3-package-cgi.mk | 15 +++++- .../python3/files/python3-package-codecs.mk | 8 +++- .../python3/files/python3-package-ctypes.mk | 8 +++- .../python3/files/python3-package-dbm.mk | 8 +++- .../python3/files/python3-package-decimal.mk | 8 +++- .../python3/files/python3-package-dev.mk | 9 +++- .../files/python3-package-distutils.mk | 8 +++- .../python3/files/python3-package-email.mk | 8 +++- .../python3/files/python3-package-lib2to3.mk | 8 +++- .../python3/files/python3-package-logging.mk | 8 +++- .../python3/files/python3-package-lzma.mk | 8 +++- .../files/python3-package-multiprocessing.mk | 8 +++- .../python3/files/python3-package-ncurses.mk | 8 +++- .../python3/files/python3-package-openssl.mk | 8 +++- .../python3/files/python3-package-pydoc.mk | 8 +++- .../python3/files/python3-package-readline.mk | 8 +++- .../python3/files/python3-package-sqlite3.mk | 8 +++- .../python3/files/python3-package-unittest.mk | 8 +++- .../python3/files/python3-package-urllib.mk | 8 +++- .../python3/files/python3-package-uuid.mk | 8 +++- .../python3/files/python3-package-venv.mk | 8 +++- .../python3/files/python3-package-xml.mk | 8 +++- 24 files changed, 198 insertions(+), 42 deletions(-) diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index 0d9e254055..45d14379c4 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -51,44 +51,52 @@ define Package/python3/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - TITLE:=Python $(PYTHON3_VERSION) programming language + TITLE:=Python $(PYTHON3_VERSION) URL:=https://www.python.org/ endef define Package/python3/Default/description - Python is a dynamic object-oriented programming language that can be used - for many kinds of software development. It offers strong support for - integration with other languages and tools, comes with extensive standard - libraries, and can be learned in a few days. Many Python programmers - report substantial productivity gains and feel the language encourages - the development of higher quality, more maintainable code. +Python is an interpreted, interactive, object-oriented programming +language. It incorporates modules, exceptions, dynamic typing, very high +level dynamic data types, and classes. It supports multiple programming +paradigms beyond object-oriented programming, such as procedural and +functional programming. Python combines remarkable power with very clear +syntax. It has interfaces to many system calls and libraries, as well as +to various window systems, and is extensible in C or C++. It is also +usable as an extension language for applications that need a +programmable interface. Finally, Python is portable: it runs on many +Unix variants including Linux and macOS, and on Windows. endef define Package/libpython3 $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) core library + TITLE+= core library DEPENDS:=+libpthread ABI_VERSION:=$(PYTHON3_VERSION) endef define Package/libpython3/description - This package contains only core Python library. +$(call Package/python3/Default/description) + +This package contains only core Python library. endef define Package/python3-base $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) interpreter + TITLE+= base interpreter DEPENDS:=+libpython3 endef define Package/python3-base/description - This package contains only the interpreter and the bare minimum - for the interpreter to start. +$(call Package/python3/Default/description) + +This package contains only the interpreter and the bare minimum for the +interpreter to start. endef define Package/python3-light $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) light installation + TITLE+= light installation DEPENDS:=+python3-base +libbz2 +zlib endef @@ -97,9 +105,10 @@ define Package/python3-light/config endef define Package/python3-light/description - This package is essentially the python3-base package plus - a few of the rarely used (and big) libraries stripped out - into separate packages. +$(call Package/python3/Default/description) + +This package installs the base interpreter package and contains the most +commonly used parts of the standard library. endef PYTHON3_LIB_FILES_DEL:= @@ -126,12 +135,15 @@ include ./files/python3-package-*.mk define Package/python3 $(call Package/python3/Default) + TITLE+= programming language DEPENDS:=+python3-light $(foreach package,$(PYTHON3_PACKAGES_DEPENDS),+$(package)) endef define Package/python3/description - This package contains the (almost) full Python install. - It's python3-light + all other packages. +$(call Package/python3/Default/description) + +This package installs almost all parts of the standard Python +installation. endef # Set READELF here so that the exact same readelf program name can be diff --git a/lang/python/python3/files/python3-package-asyncio.mk b/lang/python/python3/files/python3-package-asyncio.mk index 52eccae92d..c4c3139402 100644 --- a/lang/python/python3/files/python3-package-asyncio.mk +++ b/lang/python/python3/files/python3-package-asyncio.mk @@ -7,10 +7,16 @@ define Package/python3-asyncio $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) asyncio module + TITLE+= asyncio module DEPENDS:=+python3-light endef +define Package/python3-asyncio/description +$(call Package/python3/Default/description) + +This package contains the asyncio module. +endef + $(eval $(call Py3BasePackage,python3-asyncio, \ /usr/lib/python$(PYTHON3_VERSION)/asyncio \ )) diff --git a/lang/python/python3/files/python3-package-cgi.mk b/lang/python/python3/files/python3-package-cgi.mk index 165800a10a..e4bb110f17 100644 --- a/lang/python/python3/files/python3-package-cgi.mk +++ b/lang/python/python3/files/python3-package-cgi.mk @@ -7,16 +7,27 @@ define Package/python3-cgi $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) cgi module + TITLE+= cgi module DEPENDS:=+python3-light +python3-email endef define Package/python3-cgitb $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) cgitb module + TITLE+= cgitb module DEPENDS:=+python3-light +python3-cgi +python3-pydoc endef +define Package/python3-cgi/description +$(call Package/python3/Default/description) + +This package contains the cgi module. +endef + +define Package/python3-cgitb/description +$(call Package/python3/Default/description) + +This package contains the cgitb module. +endef $(eval $(call Py3BasePackage,python3-cgi, \ /usr/lib/python$(PYTHON3_VERSION)/cgi.py \ diff --git a/lang/python/python3/files/python3-package-codecs.mk b/lang/python/python3/files/python3-package-codecs.mk index f768b02ea2..712cb28ea8 100644 --- a/lang/python/python3/files/python3-package-codecs.mk +++ b/lang/python/python3/files/python3-package-codecs.mk @@ -7,10 +7,16 @@ define Package/python3-codecs $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) codecs + unicode support + TITLE+= codecs/Unicode support DEPENDS:=+python3-light endef +define Package/python3-codecs/description +$(call Package/python3/Default/description) + +This package contains codecs and Unicode support. +endef + $(eval $(call Py3BasePackage,python3-codecs, \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_cn.$(PYTHON3_SO_SUFFIX) \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_hk.$(PYTHON3_SO_SUFFIX) \ diff --git a/lang/python/python3/files/python3-package-ctypes.mk b/lang/python/python3/files/python3-package-ctypes.mk index e1bac47cdf..bbd0aff32c 100644 --- a/lang/python/python3/files/python3-package-ctypes.mk +++ b/lang/python/python3/files/python3-package-ctypes.mk @@ -7,10 +7,16 @@ define Package/python3-ctypes $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) ctypes module + TITLE+= ctypes module DEPENDS:=+python3-light +libffi endef +define Package/python3-ctypes/description +$(call Package/python3/Default/description) + +This package contains the ctypes module. +endef + $(eval $(call Py3BasePackage,python3-ctypes, \ /usr/lib/python$(PYTHON3_VERSION)/ctypes \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_ctypes.$(PYTHON3_SO_SUFFIX) \ diff --git a/lang/python/python3/files/python3-package-dbm.mk b/lang/python/python3/files/python3-package-dbm.mk index ede9af1631..3de584fc5d 100644 --- a/lang/python/python3/files/python3-package-dbm.mk +++ b/lang/python/python3/files/python3-package-dbm.mk @@ -7,10 +7,16 @@ define Package/python3-dbm $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) dbm module + TITLE+= dbm module DEPENDS:=+python3-light +libgdbm endef +define Package/python3-dbm/description +$(call Package/python3/Default/description) + +This package contains the dbm module. +endef + $(eval $(call Py3BasePackage,python3-dbm, \ /usr/lib/python$(PYTHON3_VERSION)/dbm \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_dbm.$(PYTHON3_SO_SUFFIX) \ diff --git a/lang/python/python3/files/python3-package-decimal.mk b/lang/python/python3/files/python3-package-decimal.mk index 391b6f659a..98f632b2b7 100644 --- a/lang/python/python3/files/python3-package-decimal.mk +++ b/lang/python/python3/files/python3-package-decimal.mk @@ -7,10 +7,16 @@ define Package/python3-decimal $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) decimal module + TITLE+= decimal module DEPENDS:=+python3-light endef +define Package/python3-decimal/description +$(call Package/python3/Default/description) + +This package contains the decimal module. +endef + $(eval $(call Py3BasePackage,python3-decimal, \ /usr/lib/python$(PYTHON3_VERSION)/decimal.py \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_decimal.$(PYTHON3_SO_SUFFIX) \ diff --git a/lang/python/python3/files/python3-package-dev.mk b/lang/python/python3/files/python3-package-dev.mk index e43ba52349..d9b7e72842 100644 --- a/lang/python/python3/files/python3-package-dev.mk +++ b/lang/python/python3/files/python3-package-dev.mk @@ -7,10 +7,17 @@ define Package/python3-dev $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) development files + TITLE+= development files DEPENDS:=+python3 +python3-lib2to3 endef +define Package/python3-dev/description +$(call Package/python3/Default/description) + +This package contains files for building Python modules, extending the +Python interpreter, or embedded Python in applications. +endef + define Py3Package/python3-dev/install $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON3_VERSION)-config $(1)/usr/bin diff --git a/lang/python/python3/files/python3-package-distutils.mk b/lang/python/python3/files/python3-package-distutils.mk index ff3564eea4..13a8f38cff 100644 --- a/lang/python/python3/files/python3-package-distutils.mk +++ b/lang/python/python3/files/python3-package-distutils.mk @@ -7,10 +7,16 @@ define Package/python3-distutils $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) distutils module + TITLE+= distutils module DEPENDS:=+python3-light +python3-email endef +define Package/python3-distutils/description +$(call Package/python3/Default/description) + +This package contains the distutils module. +endef + $(eval $(call Py3BasePackage,python3-distutils, \ /usr/lib/python$(PYTHON3_VERSION)/distutils \ )) diff --git a/lang/python/python3/files/python3-package-email.mk b/lang/python/python3/files/python3-package-email.mk index 6cf44071d6..563f6f8ae3 100644 --- a/lang/python/python3/files/python3-package-email.mk +++ b/lang/python/python3/files/python3-package-email.mk @@ -7,10 +7,16 @@ define Package/python3-email $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) email module + TITLE+= email module DEPENDS:=+python3-light endef +define Package/python3-email/description +$(call Package/python3/Default/description) + +This package contains the email module. +endef + $(eval $(call Py3BasePackage,python3-email, \ /usr/lib/python$(PYTHON3_VERSION)/email \ )) diff --git a/lang/python/python3/files/python3-package-lib2to3.mk b/lang/python/python3/files/python3-package-lib2to3.mk index ed712b6fda..c2aa84d111 100644 --- a/lang/python/python3/files/python3-package-lib2to3.mk +++ b/lang/python/python3/files/python3-package-lib2to3.mk @@ -7,10 +7,16 @@ define Package/python3-lib2to3 $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) lib2to3 module + TITLE+= lib2to3 module DEPENDS:=+python3 endef +define Package/python3-lib2to3/description +$(call Package/python3/Default/description) + +This package contains the lib2to3 module. +endef + $(eval $(call Py3BasePackage,python3-lib2to3, \ /usr/lib/python$(PYTHON3_VERSION)/lib2to3 \ , \ diff --git a/lang/python/python3/files/python3-package-logging.mk b/lang/python/python3/files/python3-package-logging.mk index fa3ec0e17a..7b770ded82 100644 --- a/lang/python/python3/files/python3-package-logging.mk +++ b/lang/python/python3/files/python3-package-logging.mk @@ -7,10 +7,16 @@ define Package/python3-logging $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) logging module + TITLE+= logging module DEPENDS:=+python3-light endef +define Package/python3-logging/description +$(call Package/python3/Default/description) + +This package contains the logging module. +endef + $(eval $(call Py3BasePackage,python3-logging, \ /usr/lib/python$(PYTHON3_VERSION)/logging \ )) diff --git a/lang/python/python3/files/python3-package-lzma.mk b/lang/python/python3/files/python3-package-lzma.mk index 57b38eced8..0e984cb7c1 100644 --- a/lang/python/python3/files/python3-package-lzma.mk +++ b/lang/python/python3/files/python3-package-lzma.mk @@ -7,10 +7,16 @@ define Package/python3-lzma $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) lzma module + TITLE+= lzma module DEPENDS:=+python3-light +liblzma endef +define Package/python3-lzma/description +$(call Package/python3/Default/description) + +This package contains the lzma module. +endef + $(eval $(call Py3BasePackage,python3-lzma, \ /usr/lib/python$(PYTHON3_VERSION)/lzma.py \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_lzma.$(PYTHON3_SO_SUFFIX) \ diff --git a/lang/python/python3/files/python3-package-multiprocessing.mk b/lang/python/python3/files/python3-package-multiprocessing.mk index c7976016d9..7f9b69a44d 100644 --- a/lang/python/python3/files/python3-package-multiprocessing.mk +++ b/lang/python/python3/files/python3-package-multiprocessing.mk @@ -7,10 +7,16 @@ define Package/python3-multiprocessing $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) multiprocessing + TITLE+= multiprocessing module DEPENDS:=+python3-light endef +define Package/python3-multiprocessing/description +$(call Package/python3/Default/description) + +This package contains the multiprocessing module. +endef + $(eval $(call Py3BasePackage,python3-multiprocessing, \ /usr/lib/python$(PYTHON3_VERSION)/multiprocessing \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_multiprocessing.$(PYTHON3_SO_SUFFIX) \ diff --git a/lang/python/python3/files/python3-package-ncurses.mk b/lang/python/python3/files/python3-package-ncurses.mk index 3ecdeb3362..5db04b8210 100644 --- a/lang/python/python3/files/python3-package-ncurses.mk +++ b/lang/python/python3/files/python3-package-ncurses.mk @@ -7,10 +7,16 @@ define Package/python3-ncurses $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) ncurses module + TITLE+= ncurses module DEPENDS:=+python3-light +libncursesw endef +define Package/python3-ncurses/description +$(call Package/python3/Default/description) + +This package contains the ncurses module. +endef + $(eval $(call Py3BasePackage,python3-ncurses, \ /usr/lib/python$(PYTHON3_VERSION)/curses \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_curses.$(PYTHON3_SO_SUFFIX) \ diff --git a/lang/python/python3/files/python3-package-openssl.mk b/lang/python/python3/files/python3-package-openssl.mk index 4d13afd202..eec9daf8c0 100644 --- a/lang/python/python3/files/python3-package-openssl.mk +++ b/lang/python/python3/files/python3-package-openssl.mk @@ -7,10 +7,16 @@ define Package/python3-openssl $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) SSL module + TITLE+= ssl module DEPENDS:=+python3-light +libopenssl +ca-certs endef +define Package/python3-openssl/description +$(call Package/python3/Default/description) + +This package contains the ssl module. +endef + $(eval $(call Py3BasePackage,python3-openssl, \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_hashlib.$(PYTHON3_SO_SUFFIX) \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_ssl.$(PYTHON3_SO_SUFFIX) \ diff --git a/lang/python/python3/files/python3-package-pydoc.mk b/lang/python/python3/files/python3-package-pydoc.mk index 9ab1a5b8ba..d5bbe7c3d1 100644 --- a/lang/python/python3/files/python3-package-pydoc.mk +++ b/lang/python/python3/files/python3-package-pydoc.mk @@ -7,10 +7,16 @@ define Package/python3-pydoc $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) pydoc module + TITLE+= pydoc module DEPENDS:=+python3-light endef +define Package/python3-pydoc/description +$(call Package/python3/Default/description) + +This package contains the pydoc module. +endef + $(eval $(call Py3BasePackage,python3-pydoc, \ /usr/lib/python$(PYTHON3_VERSION)/doctest.py \ /usr/lib/python$(PYTHON3_VERSION)/pydoc.py \ diff --git a/lang/python/python3/files/python3-package-readline.mk b/lang/python/python3/files/python3-package-readline.mk index fbff134a34..846b71168b 100644 --- a/lang/python/python3/files/python3-package-readline.mk +++ b/lang/python/python3/files/python3-package-readline.mk @@ -7,10 +7,16 @@ define Package/python3-readline $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) readline module + TITLE+= readline module DEPENDS:=+python3-light +libreadline endef +define Package/python3-readline/description +$(call Package/python3/Default/description) + +This package contains the readline module. +endef + $(eval $(call Py3BasePackage,python3-readline, \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/readline.$(PYTHON3_SO_SUFFIX) \ )) diff --git a/lang/python/python3/files/python3-package-sqlite3.mk b/lang/python/python3/files/python3-package-sqlite3.mk index 665bff26ac..06f34be6b9 100644 --- a/lang/python/python3/files/python3-package-sqlite3.mk +++ b/lang/python/python3/files/python3-package-sqlite3.mk @@ -7,10 +7,16 @@ define Package/python3-sqlite3 $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) sqlite3 module + TITLE+= sqlite3 module DEPENDS:=+python3-light +libsqlite3 endef +define Package/python3-sqlite3/description +$(call Package/python3/Default/description) + +This package contains the sqlite3 module. +endef + $(eval $(call Py3BasePackage,python3-sqlite3, \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_sqlite3.$(PYTHON3_SO_SUFFIX) \ /usr/lib/python$(PYTHON3_VERSION)/sqlite3 \ diff --git a/lang/python/python3/files/python3-package-unittest.mk b/lang/python/python3/files/python3-package-unittest.mk index d9df86f719..eb5f09ec45 100644 --- a/lang/python/python3/files/python3-package-unittest.mk +++ b/lang/python/python3/files/python3-package-unittest.mk @@ -7,10 +7,16 @@ define Package/python3-unittest $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) unittest module + TITLE+= unittest module DEPENDS:=+python3-light endef +define Package/python3-unittest/description +$(call Package/python3/Default/description) + +This package contains the unittest module. +endef + $(eval $(call Py3BasePackage,python3-unittest, \ /usr/lib/python$(PYTHON3_VERSION)/unittest \ )) diff --git a/lang/python/python3/files/python3-package-urllib.mk b/lang/python/python3/files/python3-package-urllib.mk index ddd7b1dbfb..e84e589deb 100644 --- a/lang/python/python3/files/python3-package-urllib.mk +++ b/lang/python/python3/files/python3-package-urllib.mk @@ -7,10 +7,16 @@ define Package/python3-urllib $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) URL library module + TITLE+= URL handling modules DEPENDS:=+python3-light +python3-email endef +define Package/python3-urllib/description +$(call Package/python3/Default/description) + +This package contains the URL handling modules. +endef + $(eval $(call Py3BasePackage,python3-urllib, \ /usr/lib/python$(PYTHON3_VERSION)/urllib \ )) diff --git a/lang/python/python3/files/python3-package-uuid.mk b/lang/python/python3/files/python3-package-uuid.mk index ef05c5902d..ae188738b6 100644 --- a/lang/python/python3/files/python3-package-uuid.mk +++ b/lang/python/python3/files/python3-package-uuid.mk @@ -7,10 +7,16 @@ define Package/python3-uuid $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) UUID module + TITLE+= uuid module DEPENDS:=+python3-light +libuuid endef +define Package/python3-uuid/description +$(call Package/python3/Default/description) + +This package contains the uuid module. +endef + $(eval $(call Py3BasePackage,python3-uuid, \ /usr/lib/python$(PYTHON3_VERSION)/uuid.py \ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_uuid.$(PYTHON3_SO_SUFFIX) \ diff --git a/lang/python/python3/files/python3-package-venv.mk b/lang/python/python3/files/python3-package-venv.mk index b2ddcab797..536c985ffe 100644 --- a/lang/python/python3/files/python3-package-venv.mk +++ b/lang/python/python3/files/python3-package-venv.mk @@ -7,10 +7,16 @@ define Package/python3-venv $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) venv module + TITLE+= venv module DEPENDS:=+python3 endef +define Package/python3-venv/description +$(call Package/python3/Default/description) + +This package contains the venv module. +endef + $(eval $(call Py3BasePackage,python3-venv, \ /usr/lib/python$(PYTHON3_VERSION)/ensurepip \ /usr/lib/python$(PYTHON3_VERSION)/venv \ diff --git a/lang/python/python3/files/python3-package-xml.mk b/lang/python/python3/files/python3-package-xml.mk index 84b2ce056b..97669e5dd4 100644 --- a/lang/python/python3/files/python3-package-xml.mk +++ b/lang/python/python3/files/python3-package-xml.mk @@ -7,10 +7,16 @@ define Package/python3-xml $(call Package/python3/Default) - TITLE:=Python $(PYTHON3_VERSION) xml libs + TITLE+= XML modules DEPENDS:=+python3-light +python3-urllib endef +define Package/python3-xml/description +$(call Package/python3/Default/description) + +This package contains the XML modules. +endef + $(eval $(call Py3BasePackage,python3-xml, \ /usr/lib/python$(PYTHON3_VERSION)/xml \ /usr/lib/python$(PYTHON3_VERSION)/xmlrpc \ From 2ffb87726b93ffd73a5291d6db1bc3d13fbcde17 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Thu, 29 Jun 2023 15:27:40 +0800 Subject: [PATCH 3/6] python: Rework filespec install script * Support wildcards in install (`+`) paths * Add fourth parameter to set directory permissions If file permissions are given (third parameter), these will now apply to files only. * Add non-recursive set permissions command (`==`) * Be more strict about filespec format Blank lines and lines starting with `#` will be ignored. Other errors (unknown command, missing path parameter, etc.) will cause the script to exit. * Be more strict about ensuring paths exist for all commands * Avoid spawning subshells This also removes outdated filespec paths in the python3 package; these paths delete files that are no longer present. Signed-off-by: Jeffery To --- lang/python/python-package-install.sh | 171 ++++++++++++++++++++------ lang/python/python3/Makefile | 30 ++--- 2 files changed, 148 insertions(+), 53 deletions(-) diff --git a/lang/python/python-package-install.sh b/lang/python/python-package-install.sh index fa42f6f4a8..4e7fb7af5b 100644 --- a/lang/python/python-package-install.sh +++ b/lang/python/python-package-install.sh @@ -1,45 +1,140 @@ #!/bin/sh -set -e -process_filespec() { - local src_dir="$1" - local dst_dir="$2" - local filespec="$3" - echo "$filespec" | ( - IFS='|' - while read fop fspec fperm; do - local fop=`echo "$fop" | tr -d ' \t\n'` - if [ "$fop" = "+" ]; then - if [ ! -e "${src_dir}${fspec}" ]; then - echo "File not found '${src_dir}${fspec}'" - exit 1 - fi - dpath=`dirname "$fspec"` - if [ -z "$fperm" ]; then - dperm=`stat -c "%a" ${src_dir}${dpath}` - fi - mkdir -p -m$dperm ${dst_dir}${dpath} - echo "copying: '$fspec'" - cp -fpR ${src_dir}${fspec} ${dst_dir}${dpath}/ - if [ -n "$fperm" ]; then - chmod -R $fperm ${dst_dir}${fspec} - fi - elif [ "$fop" = "-" ]; then - echo "removing: '$fspec'" - rm -fR ${dst_dir}${fspec} - elif [ "$fop" = "=" ]; then - echo "setting permissions: '$fperm' on '$fspec'" - chmod -R $fperm ${dst_dir}${fspec} - fi - done - ) +log() { + printf '%s\n' "$*" } -src_dir="$1" -dst_dir="$2" +error() { + printf 'Error: %s\n' "$*" >&2 +} + +path_exists() { + local dir="$1" + local path="$2" + + [ -n "$(find "$dir"/$path -print -quit 2>/dev/null)" ] +} + +file_dir_chmod() { + local dir="$1" + local path="$2" + local file_mode="$3" + local dir_mode="$4" + shift; shift; shift; shift; + + if [ -n "$file_mode" ]; then + find "$dir"/$path -type f "$@" -exec chmod "$file_mode" -- '{}' + + fi + + if [ -n "$dir_mode" ]; then + find "$dir"/$path -type d "$@" -exec chmod "$dir_mode" -- '{}' + + fi +} + +src="$1" +dest="$2" filespec="$3" -process_filespec "$src_dir" "$dst_dir" "$filespec" || { - echo "process filespec error-ed" +if [ -z "$src" ]; then + error "Missing source directory" exit 1 -} +fi +if [ -z "$dest" ]; then + error "Missing destination directory" + exit 1 +fi + +while IFS='|' read -r cmd path file_mode dir_mode; do + + # trim whitespace + + cmd="${cmd#"${cmd%%[![:space:]]*}"}" + cmd="${cmd%"${cmd##*[![:space:]]}"}" + + path="${path#"${path%%[![:space:]]*}"}" + path="${path%"${path##*[![:space:]]}"}" + + file_mode="${file_mode#"${file_mode%%[![:space:]]*}"}" + file_mode="${file_mode%"${file_mode##*[![:space:]]}"}" + + dir_mode="${dir_mode#"${dir_mode%%[![:space:]]*}"}" + dir_mode="${dir_mode%"${dir_mode##*[![:space:]]}"}" + + + if [ -z "$cmd" ] || [ "$cmd" != "${cmd#\#}" ]; then + continue + fi + + if [ -z "$path" ]; then + error "Missing path for \"$cmd\"" + exit 1 + fi + + case "$cmd" in + +) + log "Copying: \"$path\"" + + if ! path_exists "$src" "$path"; then + error "\"$src/$path\" not found" + exit 1 + fi + + dir="${path%/*}" + mkdir -p "$dest/$dir" + cp -fpR "$src"/$path "$dest/$dir/" + + file_dir_chmod "$dest" "$path" "$file_mode" "$dir_mode" + ;; + + -) + log "Removing: \"$path\"" + + if ! path_exists "$dest" "$path"; then + error "\"$dest/$path\" not found" + exit 1 + fi + + rm -fR -- "$dest"/$path + ;; + + =) + log "Setting recursive permissions \"${file_mode:-(none)}\"/\"${dir_mode:-(none)}\" on \"$path\"" + + if ! path_exists "$dest" "$path"; then + error "\"$dest/$path\" not found" + exit 1 + fi + + if [ -z "$file_mode$dir_mode" ]; then + error "Missing recursive permissions for \"$path\"" + exit 1 + fi + + file_dir_chmod "$dest" "$path" "$file_mode" "$dir_mode" + ;; + + ==) + log "Setting permissions \"${file_mode:-(none)}\"/\"${dir_mode:-(none)}\" on \"$path\"" + + if ! path_exists "$dest" "$path"; then + error "\"$dest/$path\" not found" + exit 1 + fi + + if [ -z "$file_mode$dir_mode" ]; then + error "Missing permissions for \"$path\"" + exit 1 + fi + + file_dir_chmod "$dest" "$path" "$file_mode" "$dir_mode" -maxdepth 0 + ;; + + *) + error "Unknown command \"$cmd\"" + exit 1 + ;; + esac + +done << EOF +$filespec +EOF diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index 45d14379c4..304e243041 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -121,13 +121,15 @@ define Py3BasePackage PYTHON3_PACKAGES_DEPENDS+=$(1) endif PYTHON3_LIB_FILES_DEL+=$(2) - define Py3Package/$(1)/filespec - ifneq ($(2),) - $(subst $(space),$(newline),$(foreach lib_file,$(2),+|$(lib_file))) - -|/usr/lib/python$(PYTHON3_VERSION)/*/test - -|/usr/lib/python$(PYTHON3_VERSION)/*/tests - endif - endef + ifeq ($(2),) + Py3Package/$(1)/filespec= + else + define Py3Package/$(1)/filespec + $(foreach lib_file,$(2), + +|$(lib_file) + ) + endef + endif Py3Package/$(1)/install?=: endef @@ -240,24 +242,22 @@ PYTHON3_LIB_FILES_DEL+=$(PYTHON3_BASE_LIB_FILES) define Py3Package/python3-base/filespec +|/usr/bin/python$(PYTHON3_VERSION) -$(subst $(space),$(newline),$(foreach lib_file,$(PYTHON3_BASE_LIB_FILES),+|$(lib_file))) +$(foreach lib_file,$(PYTHON3_BASE_LIB_FILES), + +|$(lib_file) +) endef define Py3Package/python3-light/filespec +|/usr/lib/python$(PYTHON3_VERSION) -|/usr/lib/python$(PYTHON3_VERSION)/distutils/cygwinccompiler.py --|/usr/lib/python$(PYTHON3_VERSION)/distutils/command/wininst* -|/usr/lib/python$(PYTHON3_VERSION)/idlelib -|/usr/lib/python$(PYTHON3_VERSION)/tkinter -|/usr/lib/python$(PYTHON3_VERSION)/turtledemo --|/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_test*.so --|/usr/lib/python$(PYTHON3_VERSION)/pdb.doc --|/usr/lib/python$(PYTHON3_VERSION)/test -|/usr/lib/python$(PYTHON3_VERSION)/webbrowser.py --|/usr/lib/python$(PYTHON3_VERSION)/*/test --|/usr/lib/python$(PYTHON3_VERSION)/*/tests -|/usr/lib/python$(PYTHON3_VERSION)/_osx_support.py -$(subst $(space),$(newline),$(foreach lib_file,$(PYTHON3_LIB_FILES_DEL),-|$(lib_file))) +$(foreach lib_file,$(filter /usr/lib/python$(PYTHON3_VERSION)/%,$(PYTHON3_LIB_FILES_DEL)), + -|$(lib_file) +) endef define Package/libpython3/install From b595362b8567521b9bdf003dcc88f9b962c22b10 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Thu, 29 Jun 2023 16:13:52 +0800 Subject: [PATCH 4/6] python3: Centralize config file adjustments in Build/Install Signed-off-by: Jeffery To --- lang/python/python3/Makefile | 14 +++++++++----- lang/python/python3/files/python3-package-dev.mk | 3 --- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index 304e243041..6e364e45ea 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -31,7 +31,6 @@ PYTHON3_PKG_BUILD:=0 include ../python3-package.mk PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 # LTO is handled here individually, see --with-lto below @@ -149,7 +148,7 @@ installation. endef # Set READELF here so that the exact same readelf program name can be -# replaced in _sysconfigdata.py (in Py3Package/python3-base/install) +# replaced in _sysconfigdata.py (in Build/Install) TARGET_CONFIGURE_OPTS+= \ READELF="$(TARGET_CROSS)readelf" @@ -197,6 +196,14 @@ CONFIGURE_ARGS += \ $(if $(CONFIG_IPV6),--enable-ipv6) \ $(if $(findstring mips,$(CONFIG_ARCH)),,--with-lto) +define Build/Install + $(call Build/Install/Default,) + + $(SED) 's|$(TARGET_AR)|ar|g;s|$(TARGET_CROSS)readelf|readelf|g;s|$(TARGET_CC)|gcc|g;s|$(TARGET_CXX)|g++|g' \ + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/_sysconfigdata.py \ + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/Makefile +endef + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig $(INSTALL_DIR) $(2)/bin @@ -270,9 +277,6 @@ define Py3Package/python3-base/install $(INSTALL_DIR) $(1)/usr/bin $(LN) python$(PYTHON3_VERSION) $(1)/usr/bin/python3 $(LN) python$(PYTHON3_VERSION) $(1)/usr/bin/python - # This depends on being called before filespec is processed - $(SED) 's|$(TARGET_AR)|ar|g;s|$(TARGET_CROSS)readelf|readelf|g;s|$(TARGET_CC)|gcc|g;s|$(TARGET_CXX)|g++|g' \ - $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/_sysconfigdata.py endef Py3Package/python3-light/install:=: diff --git a/lang/python/python3/files/python3-package-dev.mk b/lang/python/python3/files/python3-package-dev.mk index d9b7e72842..3eca521ffa 100644 --- a/lang/python/python3/files/python3-package-dev.mk +++ b/lang/python/python3/files/python3-package-dev.mk @@ -24,9 +24,6 @@ define Py3Package/python3-dev/install $(LN) python$(PYTHON3_VERSION)-config $(1)/usr/bin/python3-config $(LN) python$(PYTHON3_VERSION)-config $(1)/usr/bin/python-config $(LN) python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/libpython$(PYTHON3_VERSION).a $(1)/usr/lib/ - # This depends on being called before filespec is processed - $(SED) 's|$(TARGET_AR)|ar|g;s|$(TARGET_CROSS)readelf|readelf|g;s|$(TARGET_CC)|gcc|g;s|$(TARGET_CXX)|g++|g' \ - $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/Makefile endef $(eval $(call Py3BasePackage,python3-dev, \ From 5a0055df0621d4347723993b04a2fcf045929acf Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Tue, 11 Jul 2023 15:48:19 +0800 Subject: [PATCH 5/6] python3: Fix/expand platform triplet detection Currently, configure does not find the correct platform triplet for musl as the default build/host values passed by OpenWrt buildroot does not contain the text "linux-musl". This backports https://github.com/python/cpython/commit/c163d7f0b67a568e9b64eeb9c1cbbaa127818596 to add detection for mips soft float and musl. Signed-off-by: Jeffery To --- lang/python/python3/Makefile | 2 +- ...orm-triplet-detection-code-GH-107221.patch | 476 ++++++++++++++++++ ...itch-PLATFORM_TRIPLET-suffix-to-musl.patch | 49 -- 3 files changed, 477 insertions(+), 50 deletions(-) create mode 100644 lang/python/python3/patches/100-gh-95855-Refactor-platform-triplet-detection-code-GH-107221.patch delete mode 100644 lang/python/python3/patches/131-configure_ac-switch-PLATFORM_TRIPLET-suffix-to-musl.patch diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index 6e364e45ea..f355567693 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk include ../python3-version.mk PKG_NAME:=python3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz diff --git a/lang/python/python3/patches/100-gh-95855-Refactor-platform-triplet-detection-code-GH-107221.patch b/lang/python/python3/patches/100-gh-95855-Refactor-platform-triplet-detection-code-GH-107221.patch new file mode 100644 index 0000000000..c3e95a3f40 --- /dev/null +++ b/lang/python/python3/patches/100-gh-95855-Refactor-platform-triplet-detection-code-GH-107221.patch @@ -0,0 +1,476 @@ +From c163d7f0b67a568e9b64eeb9c1cbbaa127818596 Mon Sep 17 00:00:00 2001 +From: Jeffery To +Date: Thu, 24 Aug 2023 20:22:50 +0800 +Subject: [PATCH] gh-95855: Refactor platform triplet detection code, add + detection for MIPS soft float and musl libc (#107221) + +- Move platform triplet detection code into Misc/platform_triplet.c +- Refactor MIPS detection, use defined(__mips64) to detect MIPS64 +- Compute libc values in separate section +- Add detection for MIPS soft float +- Add detection for musl + +musl supports SPE with its soft-float ABI: +https://git.musl-libc.org/cgit/musl/commit/?id=7be59733d71ada3a32a98622507399253f1d5e48 + +Original patch by Christian Heimes. + +Co-authored-by: Christian Heimes +Co-authored-by: Erlend E. Aasland + +[omit news, changes to configure; adapt for Python 3.11] +Signed-off-by: Jeffery To +--- + ...3-07-25-02-30-00.gh-issue-95855.wA7rAf.rst | 2 + + Misc/platform_triplet.c | 255 ++++++++++++++++++ + configure | 192 +------------ + configure.ac | 192 +------------ + 4 files changed, 265 insertions(+), 376 deletions(-) + create mode 100644 Misc/NEWS.d/next/Build/2023-07-25-02-30-00.gh-issue-95855.wA7rAf.rst + create mode 100644 Misc/platform_triplet.c + +--- /dev/null ++++ b/Misc/platform_triplet.c +@@ -0,0 +1,255 @@ ++/* Detect platform triplet from builtin defines ++ * cc -E Misc/platform_triplet.c | grep '^PLATFORM_TRIPLET=' | tr -d ' ' ++ */ ++#undef bfin ++#undef cris ++#undef fr30 ++#undef linux ++#undef hppa ++#undef hpux ++#undef i386 ++#undef mips ++#undef powerpc ++#undef sparc ++#undef unix ++#if defined(__ANDROID__) ++ # Android is not a multiarch system. ++#elif defined(__linux__) ++/* ++ * BEGIN of Linux block ++ */ ++// Detect libc (based on config.guess) ++# include ++# if defined(__UCLIBC__) ++# error uclibc not supported ++# elif defined(__dietlibc__) ++# error dietlibc not supported ++# elif defined(__GLIBC__) ++# define LIBC gnu ++# define LIBC_X32 gnux32 ++# if defined(__ARM_PCS_VFP) ++# define LIBC_ARM gnueabihf ++# else ++# define LIBC_ARM gnueabi ++# endif ++# if defined(__loongarch__) ++# if defined(__loongarch_soft_float) ++# define LIBC_LA gnusf ++# elif defined(__loongarch_single_float) ++# define LIBC_LA gnuf32 ++# elif defined(__loongarch_double_float) ++# define LIBC_LA gnu ++# else ++# error unknown loongarch floating-point base abi ++# endif ++# endif ++# if defined(_MIPS_SIM) ++# if defined(__mips_hard_float) ++# if _MIPS_SIM == _ABIO32 ++# define LIBC_MIPS gnu ++# elif _MIPS_SIM == _ABIN32 ++# define LIBC_MIPS gnuabin32 ++# elif _MIPS_SIM == _ABI64 ++# define LIBC_MIPS gnuabi64 ++# else ++# error unknown mips sim value ++# endif ++# else ++# if _MIPS_SIM == _ABIO32 ++# define LIBC_MIPS gnusf ++# elif _MIPS_SIM == _ABIN32 ++# define LIBC_MIPS gnuabin32sf ++# elif _MIPS_SIM == _ABI64 ++# define LIBC_MIPS gnuabi64sf ++# else ++# error unknown mips sim value ++# endif ++# endif ++# endif ++# if defined(__SPE__) ++# define LIBC_PPC gnuspe ++# else ++# define LIBC_PPC gnu ++# endif ++# else ++// Heuristic to detect musl libc ++# include ++# ifdef __DEFINED_va_list ++# define LIBC musl ++# define LIBC_X32 muslx32 ++# if defined(__ARM_PCS_VFP) ++# define LIBC_ARM musleabihf ++# else ++# define LIBC_ARM musleabi ++# endif ++# if defined(__loongarch__) ++# if defined(__loongarch_soft_float) ++# define LIBC_LA muslsf ++# elif defined(__loongarch_single_float) ++# define LIBC_LA muslf32 ++# elif defined(__loongarch_double_float) ++# define LIBC_LA musl ++# else ++# error unknown loongarch floating-point base abi ++# endif ++# endif ++# if defined(_MIPS_SIM) ++# if defined(__mips_hard_float) ++# if _MIPS_SIM == _ABIO32 ++# define LIBC_MIPS musl ++# elif _MIPS_SIM == _ABIN32 ++# define LIBC_MIPS musln32 ++# elif _MIPS_SIM == _ABI64 ++# define LIBC_MIPS musl ++# else ++# error unknown mips sim value ++# endif ++# else ++# if _MIPS_SIM == _ABIO32 ++# define LIBC_MIPS muslsf ++# elif _MIPS_SIM == _ABIN32 ++# define LIBC_MIPS musln32sf ++# elif _MIPS_SIM == _ABI64 ++# define LIBC_MIPS muslsf ++# else ++# error unknown mips sim value ++# endif ++# endif ++# endif ++# if defined(_SOFT_FLOAT) || defined(__NO_FPRS__) ++# define LIBC_PPC muslsf ++# else ++# define LIBC_PPC musl ++# endif ++# else ++# error unknown libc ++# endif ++# endif ++ ++# if defined(__x86_64__) && defined(__LP64__) ++PLATFORM_TRIPLET=x86_64-linux-LIBC ++# elif defined(__x86_64__) && defined(__ILP32__) ++PLATFORM_TRIPLET=x86_64-linux-LIBC_X32 ++# elif defined(__i386__) ++PLATFORM_TRIPLET=i386-linux-LIBC ++# elif defined(__aarch64__) && defined(__AARCH64EL__) ++# if defined(__ILP32__) ++PLATFORM_TRIPLET=aarch64_ilp32-linux-LIBC ++# else ++PLATFORM_TRIPLET=aarch64-linux-LIBC ++# endif ++# elif defined(__aarch64__) && defined(__AARCH64EB__) ++# if defined(__ILP32__) ++PLATFORM_TRIPLET=aarch64_be_ilp32-linux-LIBC ++# else ++PLATFORM_TRIPLET=aarch64_be-linux-LIBC ++# endif ++# elif defined(__alpha__) ++PLATFORM_TRIPLET=alpha-linux-LIBC ++# elif defined(__ARM_EABI__) ++# if defined(__ARMEL__) ++PLATFORM_TRIPLET=arm-linux-LIBC_ARM ++# else ++PLATFORM_TRIPLET=armeb-linux-LIBC_ARM ++# endif ++# elif defined(__hppa__) ++PLATFORM_TRIPLET=hppa-linux-LIBC ++# elif defined(__ia64__) ++PLATFORM_TRIPLET=ia64-linux-LIBC ++# elif defined(__loongarch__) && defined(__loongarch_lp64) ++PLATFORM_TRIPLET=loongarch64-linux-LIBC_LA ++# elif defined(__m68k__) && !defined(__mcoldfire__) ++PLATFORM_TRIPLET=m68k-linux-LIBC ++# elif defined(__mips__) ++# if defined(__mips_isa_rev) && (__mips_isa_rev >=6) ++# if defined(_MIPSEL) && defined(__mips64) ++PLATFORM_TRIPLET=mipsisa64r6el-linux-LIBC_MIPS ++# elif defined(_MIPSEL) ++PLATFORM_TRIPLET=mipsisa32r6el-linux-LIBC_MIPS ++# elif defined(__mips64) ++PLATFORM_TRIPLET=mipsisa64r6-linux-LIBC_MIPS ++# else ++PLATFORM_TRIPLET=mipsisa32r6-linux-LIBC_MIPS ++# endif ++# else ++# if defined(_MIPSEL) && defined(__mips64) ++PLATFORM_TRIPLET=mips64el-linux-LIBC_MIPS ++# elif defined(_MIPSEL) ++PLATFORM_TRIPLET=mipsel-linux-LIBC_MIPS ++# elif defined(__mips64) ++PLATFORM_TRIPLET=mips64-linux-LIBC_MIPS ++# else ++PLATFORM_TRIPLET=mips-linux-LIBC_MIPS ++# endif ++# endif ++# elif defined(__or1k__) ++PLATFORM_TRIPLET=or1k-linux-LIBC ++# elif defined(__powerpc64__) ++# if defined(__LITTLE_ENDIAN__) ++PLATFORM_TRIPLET=powerpc64le-linux-LIBC ++# else ++PLATFORM_TRIPLET=powerpc64-linux-LIBC ++# endif ++# elif defined(__powerpc__) ++PLATFORM_TRIPLET=powerpc-linux-LIBC_PPC ++# elif defined(__s390x__) ++PLATFORM_TRIPLET=s390x-linux-LIBC ++# elif defined(__s390__) ++PLATFORM_TRIPLET=s390-linux-LIBC ++# elif defined(__sh__) && defined(__LITTLE_ENDIAN__) ++PLATFORM_TRIPLET=sh4-linux-LIBC ++# elif defined(__sparc__) && defined(__arch64__) ++PLATFORM_TRIPLET=sparc64-linux-LIBC ++# elif defined(__sparc__) ++PLATFORM_TRIPLET=sparc-linux-LIBC ++# elif defined(__riscv) ++# if __riscv_xlen == 32 ++PLATFORM_TRIPLET=riscv32-linux-LIBC ++# elif __riscv_xlen == 64 ++PLATFORM_TRIPLET=riscv64-linux-LIBC ++# else ++# error unknown platform triplet ++# endif ++# else ++# error unknown platform triplet ++# endif ++/* ++ * END of Linux block ++ */ ++#elif defined(__FreeBSD_kernel__) ++# if defined(__LP64__) ++PLATFORM_TRIPLET=x86_64-kfreebsd-gnu ++# elif defined(__i386__) ++PLATFORM_TRIPLET=i386-kfreebsd-gnu ++# else ++# error unknown platform triplet ++# endif ++#elif defined(__gnu_hurd__) ++PLATFORM_TRIPLET=i386-gnu ++#elif defined(__APPLE__) ++PLATFORM_TRIPLET=darwin ++#elif defined(__VXWORKS__) ++PLATFORM_TRIPLET=vxworks ++#elif defined(__wasm32__) ++# if defined(__EMSCRIPTEN__) ++PLATFORM_TRIPLET=wasm32-emscripten ++# elif defined(__wasi__) ++# if defined(_REENTRANT) ++PLATFORM_TRIPLET=wasm32-wasi-threads ++# else ++PLATFORM_TRIPLET=wasm32-wasi ++# endif ++# else ++# error unknown wasm32 platform ++# endif ++#elif defined(__wasm64__) ++# if defined(__EMSCRIPTEN__) ++PLATFORM_TRIPLET=wasm64-emscripten ++# elif defined(__wasi__) ++PLATFORM_TRIPLET=wasm64-wasi ++# else ++# error unknown wasm64 platform ++# endif ++#else ++# error unknown platform triplet ++#endif +--- a/configure.ac ++++ b/configure.ac +@@ -917,180 +917,14 @@ fi + + + AC_MSG_CHECKING([for the platform triplet based on compiler characteristics]) +-cat > conftest.c <=6) && defined(_MIPSEL) +-# if _MIPS_SIM == _ABIO32 +- mipsisa32r6el-linux-gnu +-# elif _MIPS_SIM == _ABIN32 +- mipsisa64r6el-linux-gnuabin32 +-# elif _MIPS_SIM == _ABI64 +- mipsisa64r6el-linux-gnuabi64 +-# else +-# error unknown platform triplet +-# endif +-# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) +-# if _MIPS_SIM == _ABIO32 +- mipsisa32r6-linux-gnu +-# elif _MIPS_SIM == _ABIN32 +- mipsisa64r6-linux-gnuabin32 +-# elif _MIPS_SIM == _ABI64 +- mipsisa64r6-linux-gnuabi64 +-# else +-# error unknown platform triplet +-# endif +-# elif defined(__mips_hard_float) && defined(_MIPSEL) +-# if _MIPS_SIM == _ABIO32 +- mipsel-linux-gnu +-# elif _MIPS_SIM == _ABIN32 +- mips64el-linux-gnuabin32 +-# elif _MIPS_SIM == _ABI64 +- mips64el-linux-gnuabi64 +-# else +-# error unknown platform triplet +-# endif +-# elif defined(__mips_hard_float) +-# if _MIPS_SIM == _ABIO32 +- mips-linux-gnu +-# elif _MIPS_SIM == _ABIN32 +- mips64-linux-gnuabin32 +-# elif _MIPS_SIM == _ABI64 +- mips64-linux-gnuabi64 +-# else +-# error unknown platform triplet +-# endif +-# elif defined(__or1k__) +- or1k-linux-gnu +-# elif defined(__powerpc__) && defined(__SPE__) +- powerpc-linux-gnuspe +-# elif defined(__powerpc64__) +-# if defined(__LITTLE_ENDIAN__) +- powerpc64le-linux-gnu +-# else +- powerpc64-linux-gnu +-# endif +-# elif defined(__powerpc__) +- powerpc-linux-gnu +-# elif defined(__s390x__) +- s390x-linux-gnu +-# elif defined(__s390__) +- s390-linux-gnu +-# elif defined(__sh__) && defined(__LITTLE_ENDIAN__) +- sh4-linux-gnu +-# elif defined(__sparc__) && defined(__arch64__) +- sparc64-linux-gnu +-# elif defined(__sparc__) +- sparc-linux-gnu +-# elif defined(__riscv) +-# if __riscv_xlen == 32 +- riscv32-linux-gnu +-# elif __riscv_xlen == 64 +- riscv64-linux-gnu +-# else +-# error unknown platform triplet +-# endif +-# else +-# error unknown platform triplet +-# endif +-#elif defined(__FreeBSD_kernel__) +-# if defined(__LP64__) +- x86_64-kfreebsd-gnu +-# elif defined(__i386__) +- i386-kfreebsd-gnu +-# else +-# error unknown platform triplet +-# endif +-#elif defined(__gnu_hurd__) +- i386-gnu +-#elif defined(__APPLE__) +- darwin +-#elif defined(__VXWORKS__) +- vxworks +-#elif defined(__wasm32__) +-# if defined(__EMSCRIPTEN__) +- wasm32-emscripten +-# elif defined(__wasi__) +- wasm32-wasi +-# else +-# error unknown wasm32 platform +-# endif +-#elif defined(__wasm64__) +-# if defined(__EMSCRIPTEN__) +- wasm64-emscripten +-# elif defined(__wasi__) +- wasm64-wasi +-# else +-# error unknown wasm64 platform +-# endif +-#else +-# error unknown platform triplet +-#endif +- +-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 ++if $CPP $CPPFLAGS $srcdir/Misc/platform_triplet.c >conftest.out 2>/dev/null; then ++ PLATFORM_TRIPLET=`grep '^PLATFORM_TRIPLET=' conftest.out | tr -d ' '` ++ PLATFORM_TRIPLET="${PLATFORM_TRIPLET@%:@PLATFORM_TRIPLET=}" + AC_MSG_RESULT([$PLATFORM_TRIPLET]) + else + AC_MSG_RESULT([none]) + fi +-rm -f conftest.c conftest.out ++rm -f conftest.out + + AC_MSG_CHECKING([for multiarch]) + AS_CASE([$ac_sys_system], diff --git a/lang/python/python3/patches/131-configure_ac-switch-PLATFORM_TRIPLET-suffix-to-musl.patch b/lang/python/python3/patches/131-configure_ac-switch-PLATFORM_TRIPLET-suffix-to-musl.patch deleted file mode 100644 index a7001e944f..0000000000 --- a/lang/python/python3/patches/131-configure_ac-switch-PLATFORM_TRIPLET-suffix-to-musl.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 15d512cc35106392ed7583d0e000d9a1b865f1e1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C5=A0imon=20Bo=C5=99ek?= -Date: Mon, 27 Jun 2022 13:53:37 +0200 -Subject: [PATCH 2/2] configure.ac: switch PLATFORM_TRIPLET suffix to '-musl' - based on `host_os` instead of `build_os` - -As `build_os` and `host_os` are results of autoconf's `AC_CANONICAL_BUILD` -and `AC_CANONICAL_HOST` macros[^1], the former refers to the system running the build -and the latter to the system that will run the compiled program. - -`PLATFORM_TRIPLET` should refer to the target platform when cross-compiling. -Its libc related part should be therefore derived from the target platform as well -- which is currently not the case - `PLATFORM_TRIPLET` '-gnu' suffix is/isn't switched to '-musl' -based on `build-os` rather than `host-os` which leads to error message[^2] -and build failure when compiling Python on glibc system for musl target. - -[^1]: https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Canonicalizing.html , -https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Specifying-Target-Triplets.html -[^2]: "internal configure error for the platform triplet, please file a bug report" - -Co-authored-by: Pali Rohár -Signed-off-by: Šimon Bořek ---- - configure | 2 +- - configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/configure -+++ b/configure -@@ -6824,7 +6824,7 @@ 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 -+ case "$host_os" in - linux-musl*) - PLATFORM_TRIPLET=`echo "$PLATFORM_TRIPLET" | sed 's/linux-gnu/linux-musl/'` - ;; ---- a/configure.ac -+++ b/configure.ac -@@ -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 ' '` -- case "$build_os" in -+ case "$host_os" in - linux-musl*) - PLATFORM_TRIPLET=`echo "$PLATFORM_TRIPLET" | sed 's/linux-gnu/linux-musl/'` - ;; From 0fe10114208e2c5cd572df043945a52e3ebeb6dd Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Thu, 29 Jun 2023 16:33:25 +0800 Subject: [PATCH 6/6] python3: Restore platform triplet to paths This removes 014-remove-platform-so-suffix.patch and 016-adjust-config-paths.patch, restoring the platform triplet to paths for: * C extensions (*.cpython-311-*.so) * Build config data directory (/usr/lib/python3.11/config-3.11-*/) * sysconfig data file (/usr/lib/python3.11/_sysconfigdata_*.py) Setting `_PYTHON_SYSCONFIGDATA_NAME` during package builds ensures that sysconfig data for target Python is loaded, in particular so that C extensions built will have the correct extension / platform triplet. Signed-off-by: Jeffery To --- lang/python/python3-package.mk | 3 +- lang/python/python3/Makefile | 31 ++++---- .../python3/files/python3-package-dev.mk | 2 +- .../014-remove-platform-so-suffix.patch | 22 ------ .../patches/016-adjust-config-paths.patch | 70 ------------------- 5 files changed, 22 insertions(+), 106 deletions(-) delete mode 100644 lang/python/python3/patches/014-remove-platform-so-suffix.patch delete mode 100644 lang/python/python3/patches/016-adjust-config-paths.patch diff --git a/lang/python/python3-package.mk b/lang/python/python3-package.mk index d07cec1744..268bca07f9 100644 --- a/lang/python/python3-package.mk +++ b/lang/python/python3-package.mk @@ -20,7 +20,7 @@ PYTHON3:=python$(PYTHON3_VERSION) PYTHON3PATH:=$(PYTHON3_LIB_DIR):$(STAGING_DIR)/$(PYTHON3_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR) --include $(PYTHON3_LIB_DIR)/config-$(PYTHON3_VERSION)/Makefile-vars +-include $(PYTHON3_LIB_DIR)/openwrt/Makefile-vars # These configure args are needed in detection of path to Python header files # using autotools. @@ -39,6 +39,7 @@ PYTHON3_VARS = \ CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON3_INC_DIR)" \ LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON3_VERSION)" \ _PYTHON_HOST_PLATFORM="$(_PYTHON_HOST_PLATFORM)" \ + _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH)" \ PYTHONPATH="$(PYTHON3PATH)" \ PYTHONDONTWRITEBYTECODE=1 \ _python_sysroot="$(STAGING_DIR)" \ diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index f355567693..0b4eb31592 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk include ../python3-version.mk PKG_NAME:=python3 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz @@ -112,7 +112,7 @@ endef PYTHON3_LIB_FILES_DEL:= PYTHON3_PACKAGES:= -PYTHON3_SO_SUFFIX:=cpython-$(PYTHON3_VERSION_MAJOR)$(PYTHON3_VERSION_MINOR).so +PYTHON3_SO_SUFFIX:=cpython-$(PYTHON3_VERSION_MAJOR)$(PYTHON3_VERSION_MINOR)-*.so PYTHON3_PACKAGES_DEPENDS:= define Py3BasePackage PYTHON3_PACKAGES+=$(1) @@ -148,7 +148,7 @@ installation. endef # Set READELF here so that the exact same readelf program name can be -# replaced in _sysconfigdata.py (in Build/Install) +# replaced in _sysconfigdata_*.py (in Build/Install) TARGET_CONFIGURE_OPTS+= \ READELF="$(TARGET_CROSS)readelf" @@ -200,27 +200,34 @@ define Build/Install $(call Build/Install/Default,) $(SED) 's|$(TARGET_AR)|ar|g;s|$(TARGET_CROSS)readelf|readelf|g;s|$(TARGET_CC)|gcc|g;s|$(TARGET_CXX)|g++|g' \ - $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/_sysconfigdata.py \ - $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/Makefile + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/_sysconfigdata_*.py \ + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)-*/Makefile endef define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig - $(INSTALL_DIR) $(2)/bin + $(INSTALL_DIR) $(1)/usr/include $(CP) \ $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON3_VERSION) \ $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION) \ $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON3_VERSION).so* \ $(1)/usr/lib/ - grep \ - '^_PYTHON_HOST_PLATFORM=' \ - $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/Makefile > \ - $(1)/usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/Makefile-vars + + $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/openwrt + grep -E \ + '^(_PYTHON_HOST_PLATFORM|ABIFLAGS|MACHDEP|MULTIARCH)=' \ + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)-*/Makefile > \ + $(1)/usr/lib/python$(PYTHON3_VERSION)/openwrt/Makefile-vars + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \ $(1)/usr/lib/pkgconfig + + $(INSTALL_DIR) $(2)/bin $(INSTALL_BIN) \ $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON3_VERSION)-config \ $(2)/bin/ @@ -233,7 +240,7 @@ PYTHON3_BASE_LIB_FILES:= \ /usr/lib/python$(PYTHON3_VERSION)/encodings \ /usr/lib/python$(PYTHON3_VERSION)/_collections_abc.py \ /usr/lib/python$(PYTHON3_VERSION)/_sitebuiltins.py \ - /usr/lib/python$(PYTHON3_VERSION)/_sysconfigdata.py \ + /usr/lib/python$(PYTHON3_VERSION)/_sysconfigdata_*.py \ /usr/lib/python$(PYTHON3_VERSION)/_weakrefset.py \ /usr/lib/python$(PYTHON3_VERSION)/abc.py \ /usr/lib/python$(PYTHON3_VERSION)/codecs.py \ diff --git a/lang/python/python3/files/python3-package-dev.mk b/lang/python/python3/files/python3-package-dev.mk index 3eca521ffa..871fff9ee9 100644 --- a/lang/python/python3/files/python3-package-dev.mk +++ b/lang/python/python3/files/python3-package-dev.mk @@ -27,7 +27,7 @@ define Py3Package/python3-dev/install endef $(eval $(call Py3BasePackage,python3-dev, \ - /usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION) \ + /usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)-* \ /usr/include/python$(PYTHON3_VERSION) \ /usr/lib/pkgconfig \ , \ diff --git a/lang/python/python3/patches/014-remove-platform-so-suffix.patch b/lang/python/python3/patches/014-remove-platform-so-suffix.patch deleted file mode 100644 index 2acd9c8b95..0000000000 --- a/lang/python/python3/patches/014-remove-platform-so-suffix.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/configure -+++ b/configure -@@ -23352,7 +23352,7 @@ printf %s "checking ABIFLAGS... " >&6; } - printf "%s\n" "$ABIFLAGS" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 - printf %s "checking SOABI... " >&6; } --SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET} -+SOABI='cpython-'`echo $VERSION | tr -d .` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5 - printf "%s\n" "$SOABI" >&6; } - ---- a/configure.ac -+++ b/configure.ac -@@ -5683,7 +5683,7 @@ AC_SUBST(SOABI) - AC_MSG_CHECKING(ABIFLAGS) - AC_MSG_RESULT($ABIFLAGS) - AC_MSG_CHECKING(SOABI) --SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET} -+SOABI='cpython-'`echo $VERSION | tr -d .` - AC_MSG_RESULT($SOABI) - - # Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI diff --git a/lang/python/python3/patches/016-adjust-config-paths.patch b/lang/python/python3/patches/016-adjust-config-paths.patch deleted file mode 100644 index 091bd63565..0000000000 --- a/lang/python/python3/patches/016-adjust-config-paths.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- a/Lib/sysconfig.py -+++ b/Lib/sysconfig.py -@@ -461,6 +461,7 @@ def get_makefile_filename(): - - - def _get_sysconfigdata_name(): -+ return '_sysconfigdata' - multiarch = getattr(sys.implementation, '_multiarch', '') - return os.environ.get( - '_PYTHON_SYSCONFIGDATA_NAME', ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -2111,7 +2111,7 @@ libinstall: all $(srcdir)/Modules/xxmodu - esac; \ - done; \ - done -- $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \ -+ $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata*.py \ - $(DESTDIR)$(LIBDEST); \ - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt - if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ -@@ -2273,7 +2273,7 @@ sharedinstall: all - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ - --root=$(DESTDIR)/ -- -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py -+ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata*.py - -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__ - - # Here are a couple of targets for MacOSX again, to install a full ---- a/configure -+++ b/configure -@@ -3630,7 +3630,7 @@ fi - 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 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_build_python" >&5 - printf "%s\n" "$with_build_python" >&6; } - -@@ -23421,7 +23421,7 @@ fi - - - --if test x$PLATFORM_TRIPLET = x; then -+if true ; then - LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}" - else - LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" ---- a/configure.ac -+++ b/configure.ac -@@ -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], -@@ -5741,7 +5741,7 @@ fi], - - dnl define LIBPL after ABIFLAGS and LDVERSION is defined. - AC_SUBST(PY_ENABLE_SHARED) --if test x$PLATFORM_TRIPLET = x; then -+if true ; then - LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}" - else - LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"