* [Buildroot] [PATCH 1/1] package/python3: drop unnecessary patches
@ 2024-04-28 2:42 Vincent Fazio
2024-04-29 8:56 ` Yann E. MORIN
2024-05-07 16:29 ` [Buildroot] [PATCH 1/2] packge/pkg-python: drop custom environment variables Vincent Fazio
0 siblings, 2 replies; 8+ messages in thread
From: Vincent Fazio @ 2024-04-28 2:42 UTC (permalink / raw)
To: buildroot
Cc: Asaf Kahlon, James Hilliard, Thomas Petazzoni, Yann E . MORIN,
Vincent Fazio
Patches 0004 and 0009 relied upon environment variables that were no
longer set after python3-010-distutils-cross-compilation-support.patch
was dropped during the transition to Python 3.4 in commit 0d327c26.
Patches 0010 and 0026 (see [0] [1] [2]) can be removed due to a fix
introduced in 3.7 [3].
Patch 0029 can be dropped since commit 3fed4245 removed the dependency
on a host provided python to build host-python3.
[0]: https://github.com/python/cpython/issues/67096
[1]: https://github.com/python/cpython/issues/75894
[2]: https://github.com/python/cpython/issues/66338
[3]: https://github.com/python/cpython/commit/14086cfc5eed8c5e78342d79e5db87a135d75fa8
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
.checkpackageignore | 51 +++++++-------
...y-header-paths-for-cross-compilation.patch | 69 -------------------
...ok-in-usr-lib-termcap-for-libraries.patch} | 0
...h => 0005-Don-t-add-multiarch-paths.patch} | 0
...> 0006-Abort-on-failed-module-build.patch} | 0
...tch => 0007-Serial-ioctl-workaround.patch} | 0
...0008-Add-an-option-to-disable-pydoc.patch} | 0
...09-Add-an-option-to-disable-lib2to3.patch} | 0
...e-shebang-of-Python-scripts-for-cros.patch | 35 ----------
...ption-to-disable-the-sqlite3-module.patch} | 0
...ig.sh.in-ensure-sed-invocations-only.patch | 67 ------------------
...-an-option-to-disable-the-tk-module.patch} | 0
...option-to-disable-the-curses-module.patch} | 0
...0013-Add-an-option-to-disable-expat.patch} | 0
...Add-an-option-to-disable-CJK-codecs.patch} | 0
...> 0015-Add-an-option-to-disable-NIS.patch} | 0
...dd-an-option-to-disable-unicodedata.patch} | 0
... 0017-Add-an-option-to-disable-IDLE.patch} | 0
...18-Add-an-option-to-disable-decimal.patch} | 0
...n-to-disable-the-ossaudiodev-module.patch} | 0
...n-option-to-disable-openssl-support.patch} | 0
...tion-to-disable-the-readline-module.patch} | 0
...o-disable-zlib-bzip2-and-xz-modules.patch} | 0
...dd-an-option-to-disable-uuid-module.patch} | 0
...p-CC-print-multiarch-output-for-mus.patch} | 0
...on-to-disable-the-berkeleydb-module.patch} | 0
...ng-doesn-t-set-errno-when-encryptio.patch} | 0
...thon-config.sh-don-t-reassign-prefix.patch | 53 --------------
...ss-compiles-when-host-and-target-us.patch} | 0
...-fix-building-on-older-distributions.patch | 47 -------------
30 files changed, 23 insertions(+), 299 deletions(-)
delete mode 100644 package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch
rename package/python3/{0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch => 0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch} (100%)
rename package/python3/{0006-Don-t-add-multiarch-paths.patch => 0005-Don-t-add-multiarch-paths.patch} (100%)
rename package/python3/{0007-Abort-on-failed-module-build.patch => 0006-Abort-on-failed-module-build.patch} (100%)
rename package/python3/{0008-Serial-ioctl-workaround.patch => 0007-Serial-ioctl-workaround.patch} (100%)
rename package/python3/{0011-Add-an-option-to-disable-pydoc.patch => 0008-Add-an-option-to-disable-pydoc.patch} (100%)
rename package/python3/{0012-Add-an-option-to-disable-lib2to3.patch => 0009-Add-an-option-to-disable-lib2to3.patch} (100%)
delete mode 100644 package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch
rename package/python3/{0013-Add-option-to-disable-the-sqlite3-module.patch => 0010-Add-option-to-disable-the-sqlite3-module.patch} (100%)
delete mode 100644 package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch
rename package/python3/{0014-Add-an-option-to-disable-the-tk-module.patch => 0011-Add-an-option-to-disable-the-tk-module.patch} (100%)
rename package/python3/{0015-Add-an-option-to-disable-the-curses-module.patch => 0012-Add-an-option-to-disable-the-curses-module.patch} (100%)
rename package/python3/{0016-Add-an-option-to-disable-expat.patch => 0013-Add-an-option-to-disable-expat.patch} (100%)
rename package/python3/{0017-Add-an-option-to-disable-CJK-codecs.patch => 0014-Add-an-option-to-disable-CJK-codecs.patch} (100%)
rename package/python3/{0018-Add-an-option-to-disable-NIS.patch => 0015-Add-an-option-to-disable-NIS.patch} (100%)
rename package/python3/{0019-Add-an-option-to-disable-unicodedata.patch => 0016-Add-an-option-to-disable-unicodedata.patch} (100%)
rename package/python3/{0020-Add-an-option-to-disable-IDLE.patch => 0017-Add-an-option-to-disable-IDLE.patch} (100%)
rename package/python3/{0021-Add-an-option-to-disable-decimal.patch => 0018-Add-an-option-to-disable-decimal.patch} (100%)
rename package/python3/{0022-Add-an-option-to-disable-the-ossaudiodev-module.patch => 0019-Add-an-option-to-disable-the-ossaudiodev-module.patch} (100%)
rename package/python3/{0023-Add-an-option-to-disable-openssl-support.patch => 0020-Add-an-option-to-disable-openssl-support.patch} (100%)
rename package/python3/{0024-Add-an-option-to-disable-the-readline-module.patch => 0021-Add-an-option-to-disable-the-readline-module.patch} (100%)
rename package/python3/{0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch => 0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch} (100%)
rename package/python3/{0027-Add-an-option-to-disable-uuid-module.patch => 0023-Add-an-option-to-disable-uuid-module.patch} (100%)
rename package/python3/{0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch => 0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch} (100%)
rename package/python3/{0030-Add-an-option-to-disable-the-berkeleydb-module.patch => 0025-Add-an-option-to-disable-the-berkeleydb-module.patch} (100%)
rename package/python3/{0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch => 0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch} (100%)
delete mode 100644 package/python3/0026-python-config.sh-don-t-reassign-prefix.patch
rename package/python3/{0032-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch => 0027-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch} (100%)
delete mode 100644 package/python3/0028-fix-building-on-older-distributions.patch
diff --git a/.checkpackageignore b/.checkpackageignore
index 1b336ce7a3..eec47fdaa4 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -1045,34 +1045,29 @@ package/python-ws4py/0001-Adjust-ws4py-for-Python-3.7-syntax.patch lib_patch.Ups
package/python3/0001-Make-the-build-of-pyc-files-conditional.patch lib_patch.Upstream
package/python3/0002-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch lib_patch.Upstream
package/python3/0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch lib_patch.Upstream
-package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch lib_patch.Upstream
-package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch lib_patch.Upstream
-package/python3/0006-Don-t-add-multiarch-paths.patch lib_patch.Upstream
-package/python3/0007-Abort-on-failed-module-build.patch lib_patch.Upstream
-package/python3/0008-Serial-ioctl-workaround.patch lib_patch.Upstream
-package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch lib_patch.Upstream
-package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch lib_patch.Upstream
-package/python3/0011-Add-an-option-to-disable-pydoc.patch lib_patch.Upstream
-package/python3/0012-Add-an-option-to-disable-lib2to3.patch lib_patch.Upstream
-package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch lib_patch.Upstream
-package/python3/0014-Add-an-option-to-disable-the-tk-module.patch lib_patch.Upstream
-package/python3/0015-Add-an-option-to-disable-the-curses-module.patch lib_patch.Upstream
-package/python3/0016-Add-an-option-to-disable-expat.patch lib_patch.Upstream
-package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch lib_patch.Upstream
-package/python3/0018-Add-an-option-to-disable-NIS.patch lib_patch.Upstream
-package/python3/0019-Add-an-option-to-disable-unicodedata.patch lib_patch.Upstream
-package/python3/0020-Add-an-option-to-disable-IDLE.patch lib_patch.Upstream
-package/python3/0021-Add-an-option-to-disable-decimal.patch lib_patch.Upstream
-package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch lib_patch.Upstream
-package/python3/0023-Add-an-option-to-disable-openssl-support.patch lib_patch.Upstream
-package/python3/0024-Add-an-option-to-disable-the-readline-module.patch lib_patch.Upstream
-package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch lib_patch.Upstream
-package/python3/0026-python-config.sh-don-t-reassign-prefix.patch lib_patch.Upstream
-package/python3/0027-Add-an-option-to-disable-uuid-module.patch lib_patch.Upstream
-package/python3/0028-fix-building-on-older-distributions.patch lib_patch.Upstream
-package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch lib_patch.Upstream
-package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch lib_patch.Upstream
-package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch lib_patch.Upstream
+package/python3/0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch lib_patch.Upstream
+package/python3/0005-Don-t-add-multiarch-paths.patch lib_patch.Upstream
+package/python3/0006-Abort-on-failed-module-build.patch lib_patch.Upstream
+package/python3/0007-Serial-ioctl-workaround.patch lib_patch.Upstream
+package/python3/0008-Add-an-option-to-disable-pydoc.patch lib_patch.Upstream
+package/python3/0009-Add-an-option-to-disable-lib2to3.patch lib_patch.Upstream
+package/python3/0010-Add-option-to-disable-the-sqlite3-module.patch lib_patch.Upstream
+package/python3/0011-Add-an-option-to-disable-the-tk-module.patch lib_patch.Upstream
+package/python3/0012-Add-an-option-to-disable-the-curses-module.patch lib_patch.Upstream
+package/python3/0013-Add-an-option-to-disable-expat.patch lib_patch.Upstream
+package/python3/0014-Add-an-option-to-disable-CJK-codecs.patch lib_patch.Upstream
+package/python3/0015-Add-an-option-to-disable-NIS.patch lib_patch.Upstream
+package/python3/0016-Add-an-option-to-disable-unicodedata.patch lib_patch.Upstream
+package/python3/0017-Add-an-option-to-disable-IDLE.patch lib_patch.Upstream
+package/python3/0018-Add-an-option-to-disable-decimal.patch lib_patch.Upstream
+package/python3/0019-Add-an-option-to-disable-the-ossaudiodev-module.patch lib_patch.Upstream
+package/python3/0020-Add-an-option-to-disable-openssl-support.patch lib_patch.Upstream
+package/python3/0021-Add-an-option-to-disable-the-readline-module.patch lib_patch.Upstream
+package/python3/0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch lib_patch.Upstream
+package/python3/0023-Add-an-option-to-disable-uuid-module.patch lib_patch.Upstream
+package/python3/0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch lib_patch.Upstream
+package/python3/0025-Add-an-option-to-disable-the-berkeleydb-module.patch lib_patch.Upstream
+package/python3/0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch lib_patch.Upstream
package/qemu/0001-tests-fp-disable-fp-bench-build-by-default.patch lib_patch.Upstream
package/qemu/0002-softmmu-qemu-seccomp.c-add-missing-header-for-CLONE_.patch lib_patch.Upstream
package/qextserialport/0001-Create-a-main-include-file-QExtSerialPort.patch lib_patch.Upstream
diff --git a/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch b/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch
deleted file mode 100644
index 9a55d2582d..0000000000
--- a/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 132b9dca3bb4d4682f7e318648ce11e1abb31b62 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Wed, 23 Dec 2015 11:33:14 +0100
-Subject: [PATCH] Adjust library/header paths for cross-compilation
-
-When cross-compiling third-party extensions, the get_python_inc() or
-get_python_lib() can be called, to return the path to headers or
-libraries. However, they use the sys.prefix of the host Python, which
-returns incorrect paths when cross-compiling (paths pointing to host
-headers and libraries).
-
-In order to fix this, we introduce the _python_sysroot, _python_prefix
-and _python_exec_prefix variables, that allow to override these
-values, and get correct header/library paths when cross-compiling
-third-party Python modules.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Signed-off-by: Adam Duskett <aduskett@gmail.com>
-Refresh for 3.10.0
----
- Lib/distutils/command/build_ext.py | 5 ++++-
- Lib/sysconfig.py | 15 +++++++++++----
- 2 files changed, 15 insertions(+), 5 deletions(-)
-
-diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
-index f287b34998..298234d6a1 100644
---- a/Lib/distutils/command/build_ext.py
-+++ b/Lib/distutils/command/build_ext.py
-@@ -234,7 +234,10 @@ def finalize_options(self):
- if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
- if not sysconfig.python_build:
- # building third party extensions
-- self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
-+ libdir = sysconfig.get_config_var('LIBDIR')
-+ if "_python_sysroot" in os.environ:
-+ libdir = os.environ.get("_python_sysroot") + libdir
-+ self.library_dirs.append(libdir)
- else:
- # building python standard extensions
- self.library_dirs.append('.')
-diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index ebe3711827..6328ec41af 100644
---- a/Lib/sysconfig.py
-+++ b/Lib/sysconfig.py
-@@ -168,10 +168,17 @@ def joinuser(*args):
- _PY_VERSION = sys.version.split()[0]
- _PY_VERSION_SHORT = f'{sys.version_info[0]}.{sys.version_info[1]}'
- _PY_VERSION_SHORT_NO_DOT = f'{sys.version_info[0]}{sys.version_info[1]}'
--_PREFIX = os.path.normpath(sys.prefix)
--_BASE_PREFIX = os.path.normpath(sys.base_prefix)
--_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
--_BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
-+if "_python_sysroot" in os.environ:
-+ _sysroot=os.environ.get('_python_sysroot')
-+ _PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
-+ _EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
-+ _BASE_PREFIX = _PREFIX
-+ _BASE_EXEC_PREFIX = _EXEC_PREFIX
-+else:
-+ _PREFIX = os.path.normpath(sys.prefix)
-+ _EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-+ _BASE_PREFIX = os.path.normpath(sys.base_prefix)
-+ _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
- _CONFIG_VARS = None
- _USER_BASE = None
-
---
-2.34.1
-
diff --git a/package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch b/package/python3/0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch
similarity index 100%
rename from package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch
rename to package/python3/0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch
diff --git a/package/python3/0006-Don-t-add-multiarch-paths.patch b/package/python3/0005-Don-t-add-multiarch-paths.patch
similarity index 100%
rename from package/python3/0006-Don-t-add-multiarch-paths.patch
rename to package/python3/0005-Don-t-add-multiarch-paths.patch
diff --git a/package/python3/0007-Abort-on-failed-module-build.patch b/package/python3/0006-Abort-on-failed-module-build.patch
similarity index 100%
rename from package/python3/0007-Abort-on-failed-module-build.patch
rename to package/python3/0006-Abort-on-failed-module-build.patch
diff --git a/package/python3/0008-Serial-ioctl-workaround.patch b/package/python3/0007-Serial-ioctl-workaround.patch
similarity index 100%
rename from package/python3/0008-Serial-ioctl-workaround.patch
rename to package/python3/0007-Serial-ioctl-workaround.patch
diff --git a/package/python3/0011-Add-an-option-to-disable-pydoc.patch b/package/python3/0008-Add-an-option-to-disable-pydoc.patch
similarity index 100%
rename from package/python3/0011-Add-an-option-to-disable-pydoc.patch
rename to package/python3/0008-Add-an-option-to-disable-pydoc.patch
diff --git a/package/python3/0012-Add-an-option-to-disable-lib2to3.patch b/package/python3/0009-Add-an-option-to-disable-lib2to3.patch
similarity index 100%
rename from package/python3/0012-Add-an-option-to-disable-lib2to3.patch
rename to package/python3/0009-Add-an-option-to-disable-lib2to3.patch
diff --git a/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch b/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch
deleted file mode 100644
index eff8fc7694..0000000000
--- a/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 2439bd2ed5dbdd7e5fda15adefd0f6f1b047ec1b Mon Sep 17 00:00:00 2001
-From: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
-Date: Wed, 23 Dec 2015 11:44:30 +0100
-Subject: [PATCH] Do not adjust the shebang of Python scripts for
- cross-compilation
-
-The copy_scripts() method in distutils copies the scripts listed in
-the setup file and adjusts the first line to refer to the current
-Python interpreter. When cross-compiling, this means that the adjusted
-shebang refers to the host Python interpreter.
-
-This patch modifies copy_scripts() to preserve the shebang when
-cross-compilation is detected.
-
-Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
----
- Lib/distutils/command/build_scripts.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py
-index ccc70e6465..d6d54195c1 100644
---- a/Lib/distutils/command/build_scripts.py
-+++ b/Lib/distutils/command/build_scripts.py
-@@ -91,7 +91,7 @@ def copy_scripts(self):
- adjust = True
- post_interp = match.group(1) or b''
-
-- if adjust:
-+ if adjust and not '_python_sysroot' in os.environ:
- log.info("copying and adjusting %s -> %s", script,
- self.build_dir)
- updated_files.append(outfile)
---
-2.34.1
-
diff --git a/package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch b/package/python3/0010-Add-option-to-disable-the-sqlite3-module.patch
similarity index 100%
rename from package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch
rename to package/python3/0010-Add-option-to-disable-the-sqlite3-module.patch
diff --git a/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch b/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch
deleted file mode 100644
index f26ee85b61..0000000000
--- a/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 55ef5552e4ee60266e3299f253bec3b13785e585 Mon Sep 17 00:00:00 2001
-From: Peter Korsgaard <peter@korsgaard.com>
-Date: Thu, 20 Nov 2014 13:24:59 +0100
-Subject: [PATCH] Misc/python-config.sh.in: ensure sed invocations only match
- beginning of strings
-
-The build/real prefix handling using sed breaks if build != real and the
-standard include / lib directories are used ($prefix/include and $prefix/lib).
-
-E.G.
-
-prefix_build="/usr", libdir="$prefix/lib", includedir="$prefix/include".
-
-If this gets installed with make DESTDIR="/foo" install, then we end up with
-prefix_real = prefix = "/foo/usr" as expected, but
-includedir="/foo/foo/usr/include" and libdir="/foo/foo/usr/lib" because of
-the double sed invocation (prefix is already expanded). Work around it by
-ensuring we only match the beginning of the string.
-
-Submitted upstream: http://bugs.python.org/issue22907
-
-Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
----
- Misc/python-config.sh.in | 13 +++++++------
- 1 file changed, 7 insertions(+), 6 deletions(-)
-
-diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
-index 2602fe24c0..a1bc3cd5f7 100644
---- a/Misc/python-config.sh.in
-+++ b/Misc/python-config.sh.in
-@@ -24,18 +24,19 @@ installed_prefix ()
- echo $RESULT
- }
-
-+prefix_build="@prefix@"
- prefix_real=$(installed_prefix "$0")
-
- # Use sed to fix paths from their built-to locations to their installed-to
- # locations. Keep prefix & exec_prefix using their original values in case
- # they are referenced in other configure variables, to prevent double
- # substitution, issue #22140.
--prefix="@prefix@"
--exec_prefix="@exec_prefix@"
-+prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#")
-+exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build#$prefix_real#")
- exec_prefix_real=${prefix_real}
--includedir=$(echo "@includedir@" | sed "s#$prefix#$prefix_real#")
--libdir=$(echo "@libdir@" | sed "s#$prefix#$prefix_real#")
--CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix#$prefix_real#")
-+includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real#")
-+libdir=$(echo "@libdir@" | sed "s#^$prefix_build#$prefix_real#")
-+CFLAGS=$(echo "@CFLAGS@" | sed "s#^$prefix_build#$prefix_real#")
- VERSION="@VERSION@"
- LIBM="@LIBM@"
- LIBC="@LIBC@"
-@@ -49,7 +50,7 @@ OPT="@OPT@"
- PY_ENABLE_SHARED="@PY_ENABLE_SHARED@"
- LDVERSION="@LDVERSION@"
- LIBDEST=${prefix_real}/lib/python${VERSION}
--LIBPL=$(echo "@LIBPL@" | sed "s#$prefix#$prefix_real#")
-+LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#")
- SO="@EXT_SUFFIX@"
- PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
- INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}"
---
-2.34.1
-
diff --git a/package/python3/0014-Add-an-option-to-disable-the-tk-module.patch b/package/python3/0011-Add-an-option-to-disable-the-tk-module.patch
similarity index 100%
rename from package/python3/0014-Add-an-option-to-disable-the-tk-module.patch
rename to package/python3/0011-Add-an-option-to-disable-the-tk-module.patch
diff --git a/package/python3/0015-Add-an-option-to-disable-the-curses-module.patch b/package/python3/0012-Add-an-option-to-disable-the-curses-module.patch
similarity index 100%
rename from package/python3/0015-Add-an-option-to-disable-the-curses-module.patch
rename to package/python3/0012-Add-an-option-to-disable-the-curses-module.patch
diff --git a/package/python3/0016-Add-an-option-to-disable-expat.patch b/package/python3/0013-Add-an-option-to-disable-expat.patch
similarity index 100%
rename from package/python3/0016-Add-an-option-to-disable-expat.patch
rename to package/python3/0013-Add-an-option-to-disable-expat.patch
diff --git a/package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch b/package/python3/0014-Add-an-option-to-disable-CJK-codecs.patch
similarity index 100%
rename from package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch
rename to package/python3/0014-Add-an-option-to-disable-CJK-codecs.patch
diff --git a/package/python3/0018-Add-an-option-to-disable-NIS.patch b/package/python3/0015-Add-an-option-to-disable-NIS.patch
similarity index 100%
rename from package/python3/0018-Add-an-option-to-disable-NIS.patch
rename to package/python3/0015-Add-an-option-to-disable-NIS.patch
diff --git a/package/python3/0019-Add-an-option-to-disable-unicodedata.patch b/package/python3/0016-Add-an-option-to-disable-unicodedata.patch
similarity index 100%
rename from package/python3/0019-Add-an-option-to-disable-unicodedata.patch
rename to package/python3/0016-Add-an-option-to-disable-unicodedata.patch
diff --git a/package/python3/0020-Add-an-option-to-disable-IDLE.patch b/package/python3/0017-Add-an-option-to-disable-IDLE.patch
similarity index 100%
rename from package/python3/0020-Add-an-option-to-disable-IDLE.patch
rename to package/python3/0017-Add-an-option-to-disable-IDLE.patch
diff --git a/package/python3/0021-Add-an-option-to-disable-decimal.patch b/package/python3/0018-Add-an-option-to-disable-decimal.patch
similarity index 100%
rename from package/python3/0021-Add-an-option-to-disable-decimal.patch
rename to package/python3/0018-Add-an-option-to-disable-decimal.patch
diff --git a/package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch b/package/python3/0019-Add-an-option-to-disable-the-ossaudiodev-module.patch
similarity index 100%
rename from package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch
rename to package/python3/0019-Add-an-option-to-disable-the-ossaudiodev-module.patch
diff --git a/package/python3/0023-Add-an-option-to-disable-openssl-support.patch b/package/python3/0020-Add-an-option-to-disable-openssl-support.patch
similarity index 100%
rename from package/python3/0023-Add-an-option-to-disable-openssl-support.patch
rename to package/python3/0020-Add-an-option-to-disable-openssl-support.patch
diff --git a/package/python3/0024-Add-an-option-to-disable-the-readline-module.patch b/package/python3/0021-Add-an-option-to-disable-the-readline-module.patch
similarity index 100%
rename from package/python3/0024-Add-an-option-to-disable-the-readline-module.patch
rename to package/python3/0021-Add-an-option-to-disable-the-readline-module.patch
diff --git a/package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch b/package/python3/0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch
similarity index 100%
rename from package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch
rename to package/python3/0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch
diff --git a/package/python3/0027-Add-an-option-to-disable-uuid-module.patch b/package/python3/0023-Add-an-option-to-disable-uuid-module.patch
similarity index 100%
rename from package/python3/0027-Add-an-option-to-disable-uuid-module.patch
rename to package/python3/0023-Add-an-option-to-disable-uuid-module.patch
diff --git a/package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch b/package/python3/0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch
similarity index 100%
rename from package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch
rename to package/python3/0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch
diff --git a/package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch b/package/python3/0025-Add-an-option-to-disable-the-berkeleydb-module.patch
similarity index 100%
rename from package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch
rename to package/python3/0025-Add-an-option-to-disable-the-berkeleydb-module.patch
diff --git a/package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch b/package/python3/0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch
similarity index 100%
rename from package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch
rename to package/python3/0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch
diff --git a/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch b/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch
deleted file mode 100644
index b6bfb010a0..0000000000
--- a/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 755fb526a62df2a73560f42184db8aadb6899bb0 Mon Sep 17 00:00:00 2001
-From: Matt Weber <matthew.weber@rockwellcollins.com>
-Date: Fri, 6 Oct 2017 09:54:15 -0500
-Subject: [PATCH] python-config.sh: don't reassign ${prefix}
-
-When prefix is set to a path like /usr during crossbuild
-the sed operations end up executing twice, once for the prefix
-reassignment and another for includedir if it is set as a string
-including the ${prefix} variable. This results in an issue
-when the build directory is under /usr.
-
-This patch updates the remaining location which uses the prefix
-variable to also sed and update to use the real path.
-
-Upstream bug report:
-https://bugs.python.org/issue31713
-
-Buildroot bug:
-https://bugs.busybox.net/show_bug.cgi?id=10361
-
-Fixes failures like the following:
-dbus-python-1.2.4 | NOK | http://autobuild.buildroot.net/results/758858efa97b6273c1b470513f5492258a6d8853
-
-Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
----
- Misc/python-config.sh.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
-index a1bc3cd5f7..164d2d3603 100644
---- a/Misc/python-config.sh.in
-+++ b/Misc/python-config.sh.in
-@@ -31,7 +31,7 @@ prefix_real=$(installed_prefix "$0")
- # locations. Keep prefix & exec_prefix using their original values in case
- # they are referenced in other configure variables, to prevent double
- # substitution, issue #22140.
--prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#")
-+prefix=$prefix_build
- exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build#$prefix_real#")
- exec_prefix_real=${prefix_real}
- includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real#")
-@@ -49,7 +49,7 @@ LDLIBRARY="@LDLIBRARY@"
- OPT="@OPT@"
- PY_ENABLE_SHARED="@PY_ENABLE_SHARED@"
- LDVERSION="@LDVERSION@"
--LIBDEST=${prefix_real}/lib/python${VERSION}
-+LIBDEST=$( echo "${prefix}/lib/python${VERSION}" | sed "s#^$prefix_build#$prefix_real#")
- LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#")
- SO="@EXT_SUFFIX@"
- PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
---
-2.34.1
-
diff --git a/package/python3/0032-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch b/package/python3/0027-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch
similarity index 100%
rename from package/python3/0032-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch
rename to package/python3/0027-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch
diff --git a/package/python3/0028-fix-building-on-older-distributions.patch b/package/python3/0028-fix-building-on-older-distributions.patch
deleted file mode 100644
index 4541b31c5f..0000000000
--- a/package/python3/0028-fix-building-on-older-distributions.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From e52e2c5e3df4bc3d2ff07ecb3b8e2a9099ea1631 Mon Sep 17 00:00:00 2001
-From: Adam Duskett <aduskett@gmail.com>
-Date: Thu, 16 Aug 2018 14:52:37 -0700
-Subject: [PATCH] fix building on older distributions
-
-Python > 3.6.3 calls os.replace in the update_file.py script, during the
-regen-importlib phase of the build process.
-
-According to Doc/whatsnew/3.3.rst line 1631, os.replace acts in the same
-way as os.rename, however, it is now cross-platform compatible for Windows.
-
-Because BuildRoot is guaranteed only to be built in POSIX environment, it is
-safe to change os.replace back to os.rename.
-
-This change fixes building on older systems such as CentOS7, that only come
-with python 2.
-
-Signed-off-by: Adam Duskett <aduskett@gmail.com>
----
- Tools/scripts/update_file.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Tools/scripts/update_file.py b/Tools/scripts/update_file.py
-index b4182c1d0c..ab443cb1a6 100644
---- a/Tools/scripts/update_file.py
-+++ b/Tools/scripts/update_file.py
-@@ -53,7 +53,7 @@ def update_file_with_tmpfile(filename, tmpfile, *, create=False):
- if not create:
- raise # re-raise
- outcome = 'created'
-- os.replace(tmpfile, filename)
-+ os.rename(tmpfile, filename)
- else:
- with targetfile:
- old_contents = targetfile.read()
-@@ -62,7 +62,7 @@ def update_file_with_tmpfile(filename, tmpfile, *, create=False):
- # Now compare!
- if old_contents != new_contents:
- outcome = 'updated'
-- os.replace(tmpfile, filename)
-+ os.rename(tmpfile, filename)
- else:
- outcome = 'same'
- os.unlink(tmpfile)
---
-2.34.1
-
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [Buildroot] [PATCH 1/1] package/python3: drop unnecessary patches 2024-04-28 2:42 [Buildroot] [PATCH 1/1] package/python3: drop unnecessary patches Vincent Fazio @ 2024-04-29 8:56 ` Yann E. MORIN 2024-04-29 14:48 ` Vincent Fazio 2024-05-07 16:29 ` [Buildroot] [PATCH 1/2] packge/pkg-python: drop custom environment variables Vincent Fazio 1 sibling, 1 reply; 8+ messages in thread From: Yann E. MORIN @ 2024-04-29 8:56 UTC (permalink / raw) To: Vincent Fazio; +Cc: James Hilliard, Thomas Petazzoni, Asaf Kahlon, buildroot Vincent, All, Thanks for tackling this python mess! On 2024-04-27 21:42 -0500, Vincent Fazio spake thusly: > Patches 0004 and 0009 relied upon environment variables that were no > longer set after python3-010-distutils-cross-compilation-support.patch > was dropped during the transition to Python 3.4 in commit 0d327c26. 0004 and 0009 use the _python_sysroot env variable, and it is still set in the environment when we build python packages: $ git grep -n _python_sysroot package/pkg-python.mk:45: _python_sysroot=$(STAGING_DIR) \ It is totally possible that those patches are no longer needed for other reasons, though, but not that one. Regards, Yann E. MORIN. > Patches 0010 and 0026 (see [0] [1] [2]) can be removed due to a fix > introduced in 3.7 [3]. > > Patch 0029 can be dropped since commit 3fed4245 removed the dependency > on a host provided python to build host-python3. > > [0]: https://github.com/python/cpython/issues/67096 > [1]: https://github.com/python/cpython/issues/75894 > [2]: https://github.com/python/cpython/issues/66338 > [3]: https://github.com/python/cpython/commit/14086cfc5eed8c5e78342d79e5db87a135d75fa8 > > Signed-off-by: Vincent Fazio <vfazio@gmail.com> > --- > .checkpackageignore | 51 +++++++------- > ...y-header-paths-for-cross-compilation.patch | 69 ------------------- > ...ok-in-usr-lib-termcap-for-libraries.patch} | 0 > ...h => 0005-Don-t-add-multiarch-paths.patch} | 0 > ...> 0006-Abort-on-failed-module-build.patch} | 0 > ...tch => 0007-Serial-ioctl-workaround.patch} | 0 > ...0008-Add-an-option-to-disable-pydoc.patch} | 0 > ...09-Add-an-option-to-disable-lib2to3.patch} | 0 > ...e-shebang-of-Python-scripts-for-cros.patch | 35 ---------- > ...ption-to-disable-the-sqlite3-module.patch} | 0 > ...ig.sh.in-ensure-sed-invocations-only.patch | 67 ------------------ > ...-an-option-to-disable-the-tk-module.patch} | 0 > ...option-to-disable-the-curses-module.patch} | 0 > ...0013-Add-an-option-to-disable-expat.patch} | 0 > ...Add-an-option-to-disable-CJK-codecs.patch} | 0 > ...> 0015-Add-an-option-to-disable-NIS.patch} | 0 > ...dd-an-option-to-disable-unicodedata.patch} | 0 > ... 0017-Add-an-option-to-disable-IDLE.patch} | 0 > ...18-Add-an-option-to-disable-decimal.patch} | 0 > ...n-to-disable-the-ossaudiodev-module.patch} | 0 > ...n-option-to-disable-openssl-support.patch} | 0 > ...tion-to-disable-the-readline-module.patch} | 0 > ...o-disable-zlib-bzip2-and-xz-modules.patch} | 0 > ...dd-an-option-to-disable-uuid-module.patch} | 0 > ...p-CC-print-multiarch-output-for-mus.patch} | 0 > ...on-to-disable-the-berkeleydb-module.patch} | 0 > ...ng-doesn-t-set-errno-when-encryptio.patch} | 0 > ...thon-config.sh-don-t-reassign-prefix.patch | 53 -------------- > ...ss-compiles-when-host-and-target-us.patch} | 0 > ...-fix-building-on-older-distributions.patch | 47 ------------- > 30 files changed, 23 insertions(+), 299 deletions(-) > delete mode 100644 package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch > rename package/python3/{0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch => 0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch} (100%) > rename package/python3/{0006-Don-t-add-multiarch-paths.patch => 0005-Don-t-add-multiarch-paths.patch} (100%) > rename package/python3/{0007-Abort-on-failed-module-build.patch => 0006-Abort-on-failed-module-build.patch} (100%) > rename package/python3/{0008-Serial-ioctl-workaround.patch => 0007-Serial-ioctl-workaround.patch} (100%) > rename package/python3/{0011-Add-an-option-to-disable-pydoc.patch => 0008-Add-an-option-to-disable-pydoc.patch} (100%) > rename package/python3/{0012-Add-an-option-to-disable-lib2to3.patch => 0009-Add-an-option-to-disable-lib2to3.patch} (100%) > delete mode 100644 package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > rename package/python3/{0013-Add-option-to-disable-the-sqlite3-module.patch => 0010-Add-option-to-disable-the-sqlite3-module.patch} (100%) > delete mode 100644 package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > rename package/python3/{0014-Add-an-option-to-disable-the-tk-module.patch => 0011-Add-an-option-to-disable-the-tk-module.patch} (100%) > rename package/python3/{0015-Add-an-option-to-disable-the-curses-module.patch => 0012-Add-an-option-to-disable-the-curses-module.patch} (100%) > rename package/python3/{0016-Add-an-option-to-disable-expat.patch => 0013-Add-an-option-to-disable-expat.patch} (100%) > rename package/python3/{0017-Add-an-option-to-disable-CJK-codecs.patch => 0014-Add-an-option-to-disable-CJK-codecs.patch} (100%) > rename package/python3/{0018-Add-an-option-to-disable-NIS.patch => 0015-Add-an-option-to-disable-NIS.patch} (100%) > rename package/python3/{0019-Add-an-option-to-disable-unicodedata.patch => 0016-Add-an-option-to-disable-unicodedata.patch} (100%) > rename package/python3/{0020-Add-an-option-to-disable-IDLE.patch => 0017-Add-an-option-to-disable-IDLE.patch} (100%) > rename package/python3/{0021-Add-an-option-to-disable-decimal.patch => 0018-Add-an-option-to-disable-decimal.patch} (100%) > rename package/python3/{0022-Add-an-option-to-disable-the-ossaudiodev-module.patch => 0019-Add-an-option-to-disable-the-ossaudiodev-module.patch} (100%) > rename package/python3/{0023-Add-an-option-to-disable-openssl-support.patch => 0020-Add-an-option-to-disable-openssl-support.patch} (100%) > rename package/python3/{0024-Add-an-option-to-disable-the-readline-module.patch => 0021-Add-an-option-to-disable-the-readline-module.patch} (100%) > rename package/python3/{0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch => 0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch} (100%) > rename package/python3/{0027-Add-an-option-to-disable-uuid-module.patch => 0023-Add-an-option-to-disable-uuid-module.patch} (100%) > rename package/python3/{0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch => 0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch} (100%) > rename package/python3/{0030-Add-an-option-to-disable-the-berkeleydb-module.patch => 0025-Add-an-option-to-disable-the-berkeleydb-module.patch} (100%) > rename package/python3/{0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch => 0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch} (100%) > delete mode 100644 package/python3/0026-python-config.sh-don-t-reassign-prefix.patch > rename package/python3/{0032-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch => 0027-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch} (100%) > delete mode 100644 package/python3/0028-fix-building-on-older-distributions.patch > > diff --git a/.checkpackageignore b/.checkpackageignore > index 1b336ce7a3..eec47fdaa4 100644 > --- a/.checkpackageignore > +++ b/.checkpackageignore > @@ -1045,34 +1045,29 @@ package/python-ws4py/0001-Adjust-ws4py-for-Python-3.7-syntax.patch lib_patch.Ups > package/python3/0001-Make-the-build-of-pyc-files-conditional.patch lib_patch.Upstream > package/python3/0002-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch lib_patch.Upstream > package/python3/0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch lib_patch.Upstream > -package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch lib_patch.Upstream > -package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch lib_patch.Upstream > -package/python3/0006-Don-t-add-multiarch-paths.patch lib_patch.Upstream > -package/python3/0007-Abort-on-failed-module-build.patch lib_patch.Upstream > -package/python3/0008-Serial-ioctl-workaround.patch lib_patch.Upstream > -package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch lib_patch.Upstream > -package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch lib_patch.Upstream > -package/python3/0011-Add-an-option-to-disable-pydoc.patch lib_patch.Upstream > -package/python3/0012-Add-an-option-to-disable-lib2to3.patch lib_patch.Upstream > -package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch lib_patch.Upstream > -package/python3/0014-Add-an-option-to-disable-the-tk-module.patch lib_patch.Upstream > -package/python3/0015-Add-an-option-to-disable-the-curses-module.patch lib_patch.Upstream > -package/python3/0016-Add-an-option-to-disable-expat.patch lib_patch.Upstream > -package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch lib_patch.Upstream > -package/python3/0018-Add-an-option-to-disable-NIS.patch lib_patch.Upstream > -package/python3/0019-Add-an-option-to-disable-unicodedata.patch lib_patch.Upstream > -package/python3/0020-Add-an-option-to-disable-IDLE.patch lib_patch.Upstream > -package/python3/0021-Add-an-option-to-disable-decimal.patch lib_patch.Upstream > -package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch lib_patch.Upstream > -package/python3/0023-Add-an-option-to-disable-openssl-support.patch lib_patch.Upstream > -package/python3/0024-Add-an-option-to-disable-the-readline-module.patch lib_patch.Upstream > -package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch lib_patch.Upstream > -package/python3/0026-python-config.sh-don-t-reassign-prefix.patch lib_patch.Upstream > -package/python3/0027-Add-an-option-to-disable-uuid-module.patch lib_patch.Upstream > -package/python3/0028-fix-building-on-older-distributions.patch lib_patch.Upstream > -package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch lib_patch.Upstream > -package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch lib_patch.Upstream > -package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch lib_patch.Upstream > +package/python3/0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch lib_patch.Upstream > +package/python3/0005-Don-t-add-multiarch-paths.patch lib_patch.Upstream > +package/python3/0006-Abort-on-failed-module-build.patch lib_patch.Upstream > +package/python3/0007-Serial-ioctl-workaround.patch lib_patch.Upstream > +package/python3/0008-Add-an-option-to-disable-pydoc.patch lib_patch.Upstream > +package/python3/0009-Add-an-option-to-disable-lib2to3.patch lib_patch.Upstream > +package/python3/0010-Add-option-to-disable-the-sqlite3-module.patch lib_patch.Upstream > +package/python3/0011-Add-an-option-to-disable-the-tk-module.patch lib_patch.Upstream > +package/python3/0012-Add-an-option-to-disable-the-curses-module.patch lib_patch.Upstream > +package/python3/0013-Add-an-option-to-disable-expat.patch lib_patch.Upstream > +package/python3/0014-Add-an-option-to-disable-CJK-codecs.patch lib_patch.Upstream > +package/python3/0015-Add-an-option-to-disable-NIS.patch lib_patch.Upstream > +package/python3/0016-Add-an-option-to-disable-unicodedata.patch lib_patch.Upstream > +package/python3/0017-Add-an-option-to-disable-IDLE.patch lib_patch.Upstream > +package/python3/0018-Add-an-option-to-disable-decimal.patch lib_patch.Upstream > +package/python3/0019-Add-an-option-to-disable-the-ossaudiodev-module.patch lib_patch.Upstream > +package/python3/0020-Add-an-option-to-disable-openssl-support.patch lib_patch.Upstream > +package/python3/0021-Add-an-option-to-disable-the-readline-module.patch lib_patch.Upstream > +package/python3/0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch lib_patch.Upstream > +package/python3/0023-Add-an-option-to-disable-uuid-module.patch lib_patch.Upstream > +package/python3/0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch lib_patch.Upstream > +package/python3/0025-Add-an-option-to-disable-the-berkeleydb-module.patch lib_patch.Upstream > +package/python3/0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch lib_patch.Upstream > package/qemu/0001-tests-fp-disable-fp-bench-build-by-default.patch lib_patch.Upstream > package/qemu/0002-softmmu-qemu-seccomp.c-add-missing-header-for-CLONE_.patch lib_patch.Upstream > package/qextserialport/0001-Create-a-main-include-file-QExtSerialPort.patch lib_patch.Upstream > diff --git a/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch b/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch > deleted file mode 100644 > index 9a55d2582d..0000000000 > --- a/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch > +++ /dev/null > @@ -1,69 +0,0 @@ > -From 132b9dca3bb4d4682f7e318648ce11e1abb31b62 Mon Sep 17 00:00:00 2001 > -From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > -Date: Wed, 23 Dec 2015 11:33:14 +0100 > -Subject: [PATCH] Adjust library/header paths for cross-compilation > - > -When cross-compiling third-party extensions, the get_python_inc() or > -get_python_lib() can be called, to return the path to headers or > -libraries. However, they use the sys.prefix of the host Python, which > -returns incorrect paths when cross-compiling (paths pointing to host > -headers and libraries). > - > -In order to fix this, we introduce the _python_sysroot, _python_prefix > -and _python_exec_prefix variables, that allow to override these > -values, and get correct header/library paths when cross-compiling > -third-party Python modules. > - > -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > -Signed-off-by: Adam Duskett <aduskett@gmail.com> > -Refresh for 3.10.0 > ---- > - Lib/distutils/command/build_ext.py | 5 ++++- > - Lib/sysconfig.py | 15 +++++++++++---- > - 2 files changed, 15 insertions(+), 5 deletions(-) > - > -diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py > -index f287b34998..298234d6a1 100644 > ---- a/Lib/distutils/command/build_ext.py > -+++ b/Lib/distutils/command/build_ext.py > -@@ -234,7 +234,10 @@ def finalize_options(self): > - if (sysconfig.get_config_var('Py_ENABLE_SHARED')): > - if not sysconfig.python_build: > - # building third party extensions > -- self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) > -+ libdir = sysconfig.get_config_var('LIBDIR') > -+ if "_python_sysroot" in os.environ: > -+ libdir = os.environ.get("_python_sysroot") + libdir > -+ self.library_dirs.append(libdir) > - else: > - # building python standard extensions > - self.library_dirs.append('.') > -diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py > -index ebe3711827..6328ec41af 100644 > ---- a/Lib/sysconfig.py > -+++ b/Lib/sysconfig.py > -@@ -168,10 +168,17 @@ def joinuser(*args): > - _PY_VERSION = sys.version.split()[0] > - _PY_VERSION_SHORT = f'{sys.version_info[0]}.{sys.version_info[1]}' > - _PY_VERSION_SHORT_NO_DOT = f'{sys.version_info[0]}{sys.version_info[1]}' > --_PREFIX = os.path.normpath(sys.prefix) > --_BASE_PREFIX = os.path.normpath(sys.base_prefix) > --_EXEC_PREFIX = os.path.normpath(sys.exec_prefix) > --_BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) > -+if "_python_sysroot" in os.environ: > -+ _sysroot=os.environ.get('_python_sysroot') > -+ _PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) > -+ _EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) > -+ _BASE_PREFIX = _PREFIX > -+ _BASE_EXEC_PREFIX = _EXEC_PREFIX > -+else: > -+ _PREFIX = os.path.normpath(sys.prefix) > -+ _EXEC_PREFIX = os.path.normpath(sys.exec_prefix) > -+ _BASE_PREFIX = os.path.normpath(sys.base_prefix) > -+ _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) > - _CONFIG_VARS = None > - _USER_BASE = None > - > --- > -2.34.1 > - > diff --git a/package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch b/package/python3/0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch > similarity index 100% > rename from package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch > rename to package/python3/0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch > diff --git a/package/python3/0006-Don-t-add-multiarch-paths.patch b/package/python3/0005-Don-t-add-multiarch-paths.patch > similarity index 100% > rename from package/python3/0006-Don-t-add-multiarch-paths.patch > rename to package/python3/0005-Don-t-add-multiarch-paths.patch > diff --git a/package/python3/0007-Abort-on-failed-module-build.patch b/package/python3/0006-Abort-on-failed-module-build.patch > similarity index 100% > rename from package/python3/0007-Abort-on-failed-module-build.patch > rename to package/python3/0006-Abort-on-failed-module-build.patch > diff --git a/package/python3/0008-Serial-ioctl-workaround.patch b/package/python3/0007-Serial-ioctl-workaround.patch > similarity index 100% > rename from package/python3/0008-Serial-ioctl-workaround.patch > rename to package/python3/0007-Serial-ioctl-workaround.patch > diff --git a/package/python3/0011-Add-an-option-to-disable-pydoc.patch b/package/python3/0008-Add-an-option-to-disable-pydoc.patch > similarity index 100% > rename from package/python3/0011-Add-an-option-to-disable-pydoc.patch > rename to package/python3/0008-Add-an-option-to-disable-pydoc.patch > diff --git a/package/python3/0012-Add-an-option-to-disable-lib2to3.patch b/package/python3/0009-Add-an-option-to-disable-lib2to3.patch > similarity index 100% > rename from package/python3/0012-Add-an-option-to-disable-lib2to3.patch > rename to package/python3/0009-Add-an-option-to-disable-lib2to3.patch > diff --git a/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch b/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > deleted file mode 100644 > index eff8fc7694..0000000000 > --- a/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > +++ /dev/null > @@ -1,35 +0,0 @@ > -From 2439bd2ed5dbdd7e5fda15adefd0f6f1b047ec1b Mon Sep 17 00:00:00 2001 > -From: Christophe Vu-Brugier <cvubrugier@fastmail.fm> > -Date: Wed, 23 Dec 2015 11:44:30 +0100 > -Subject: [PATCH] Do not adjust the shebang of Python scripts for > - cross-compilation > - > -The copy_scripts() method in distutils copies the scripts listed in > -the setup file and adjusts the first line to refer to the current > -Python interpreter. When cross-compiling, this means that the adjusted > -shebang refers to the host Python interpreter. > - > -This patch modifies copy_scripts() to preserve the shebang when > -cross-compilation is detected. > - > -Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm> > ---- > - Lib/distutils/command/build_scripts.py | 2 +- > - 1 file changed, 1 insertion(+), 1 deletion(-) > - > -diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py > -index ccc70e6465..d6d54195c1 100644 > ---- a/Lib/distutils/command/build_scripts.py > -+++ b/Lib/distutils/command/build_scripts.py > -@@ -91,7 +91,7 @@ def copy_scripts(self): > - adjust = True > - post_interp = match.group(1) or b'' > - > -- if adjust: > -+ if adjust and not '_python_sysroot' in os.environ: > - log.info("copying and adjusting %s -> %s", script, > - self.build_dir) > - updated_files.append(outfile) > --- > -2.34.1 > - > diff --git a/package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch b/package/python3/0010-Add-option-to-disable-the-sqlite3-module.patch > similarity index 100% > rename from package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch > rename to package/python3/0010-Add-option-to-disable-the-sqlite3-module.patch > diff --git a/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch b/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > deleted file mode 100644 > index f26ee85b61..0000000000 > --- a/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > +++ /dev/null > @@ -1,67 +0,0 @@ > -From 55ef5552e4ee60266e3299f253bec3b13785e585 Mon Sep 17 00:00:00 2001 > -From: Peter Korsgaard <peter@korsgaard.com> > -Date: Thu, 20 Nov 2014 13:24:59 +0100 > -Subject: [PATCH] Misc/python-config.sh.in: ensure sed invocations only match > - beginning of strings > - > -The build/real prefix handling using sed breaks if build != real and the > -standard include / lib directories are used ($prefix/include and $prefix/lib). > - > -E.G. > - > -prefix_build="/usr", libdir="$prefix/lib", includedir="$prefix/include". > - > -If this gets installed with make DESTDIR="/foo" install, then we end up with > -prefix_real = prefix = "/foo/usr" as expected, but > -includedir="/foo/foo/usr/include" and libdir="/foo/foo/usr/lib" because of > -the double sed invocation (prefix is already expanded). Work around it by > -ensuring we only match the beginning of the string. > - > -Submitted upstream: http://bugs.python.org/issue22907 > - > -Signed-off-by: Peter Korsgaard <peter@korsgaard.com> > ---- > - Misc/python-config.sh.in | 13 +++++++------ > - 1 file changed, 7 insertions(+), 6 deletions(-) > - > -diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in > -index 2602fe24c0..a1bc3cd5f7 100644 > ---- a/Misc/python-config.sh.in > -+++ b/Misc/python-config.sh.in > -@@ -24,18 +24,19 @@ installed_prefix () > - echo $RESULT > - } > - > -+prefix_build="@prefix@" > - prefix_real=$(installed_prefix "$0") > - > - # Use sed to fix paths from their built-to locations to their installed-to > - # locations. Keep prefix & exec_prefix using their original values in case > - # they are referenced in other configure variables, to prevent double > - # substitution, issue #22140. > --prefix="@prefix@" > --exec_prefix="@exec_prefix@" > -+prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#") > -+exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build#$prefix_real#") > - exec_prefix_real=${prefix_real} > --includedir=$(echo "@includedir@" | sed "s#$prefix#$prefix_real#") > --libdir=$(echo "@libdir@" | sed "s#$prefix#$prefix_real#") > --CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix#$prefix_real#") > -+includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real#") > -+libdir=$(echo "@libdir@" | sed "s#^$prefix_build#$prefix_real#") > -+CFLAGS=$(echo "@CFLAGS@" | sed "s#^$prefix_build#$prefix_real#") > - VERSION="@VERSION@" > - LIBM="@LIBM@" > - LIBC="@LIBC@" > -@@ -49,7 +50,7 @@ OPT="@OPT@" > - PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" > - LDVERSION="@LDVERSION@" > - LIBDEST=${prefix_real}/lib/python${VERSION} > --LIBPL=$(echo "@LIBPL@" | sed "s#$prefix#$prefix_real#") > -+LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#") > - SO="@EXT_SUFFIX@" > - PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" > - INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" > --- > -2.34.1 > - > diff --git a/package/python3/0014-Add-an-option-to-disable-the-tk-module.patch b/package/python3/0011-Add-an-option-to-disable-the-tk-module.patch > similarity index 100% > rename from package/python3/0014-Add-an-option-to-disable-the-tk-module.patch > rename to package/python3/0011-Add-an-option-to-disable-the-tk-module.patch > diff --git a/package/python3/0015-Add-an-option-to-disable-the-curses-module.patch b/package/python3/0012-Add-an-option-to-disable-the-curses-module.patch > similarity index 100% > rename from package/python3/0015-Add-an-option-to-disable-the-curses-module.patch > rename to package/python3/0012-Add-an-option-to-disable-the-curses-module.patch > diff --git a/package/python3/0016-Add-an-option-to-disable-expat.patch b/package/python3/0013-Add-an-option-to-disable-expat.patch > similarity index 100% > rename from package/python3/0016-Add-an-option-to-disable-expat.patch > rename to package/python3/0013-Add-an-option-to-disable-expat.patch > diff --git a/package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch b/package/python3/0014-Add-an-option-to-disable-CJK-codecs.patch > similarity index 100% > rename from package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch > rename to package/python3/0014-Add-an-option-to-disable-CJK-codecs.patch > diff --git a/package/python3/0018-Add-an-option-to-disable-NIS.patch b/package/python3/0015-Add-an-option-to-disable-NIS.patch > similarity index 100% > rename from package/python3/0018-Add-an-option-to-disable-NIS.patch > rename to package/python3/0015-Add-an-option-to-disable-NIS.patch > diff --git a/package/python3/0019-Add-an-option-to-disable-unicodedata.patch b/package/python3/0016-Add-an-option-to-disable-unicodedata.patch > similarity index 100% > rename from package/python3/0019-Add-an-option-to-disable-unicodedata.patch > rename to package/python3/0016-Add-an-option-to-disable-unicodedata.patch > diff --git a/package/python3/0020-Add-an-option-to-disable-IDLE.patch b/package/python3/0017-Add-an-option-to-disable-IDLE.patch > similarity index 100% > rename from package/python3/0020-Add-an-option-to-disable-IDLE.patch > rename to package/python3/0017-Add-an-option-to-disable-IDLE.patch > diff --git a/package/python3/0021-Add-an-option-to-disable-decimal.patch b/package/python3/0018-Add-an-option-to-disable-decimal.patch > similarity index 100% > rename from package/python3/0021-Add-an-option-to-disable-decimal.patch > rename to package/python3/0018-Add-an-option-to-disable-decimal.patch > diff --git a/package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch b/package/python3/0019-Add-an-option-to-disable-the-ossaudiodev-module.patch > similarity index 100% > rename from package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch > rename to package/python3/0019-Add-an-option-to-disable-the-ossaudiodev-module.patch > diff --git a/package/python3/0023-Add-an-option-to-disable-openssl-support.patch b/package/python3/0020-Add-an-option-to-disable-openssl-support.patch > similarity index 100% > rename from package/python3/0023-Add-an-option-to-disable-openssl-support.patch > rename to package/python3/0020-Add-an-option-to-disable-openssl-support.patch > diff --git a/package/python3/0024-Add-an-option-to-disable-the-readline-module.patch b/package/python3/0021-Add-an-option-to-disable-the-readline-module.patch > similarity index 100% > rename from package/python3/0024-Add-an-option-to-disable-the-readline-module.patch > rename to package/python3/0021-Add-an-option-to-disable-the-readline-module.patch > diff --git a/package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch b/package/python3/0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > similarity index 100% > rename from package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > rename to package/python3/0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > diff --git a/package/python3/0027-Add-an-option-to-disable-uuid-module.patch b/package/python3/0023-Add-an-option-to-disable-uuid-module.patch > similarity index 100% > rename from package/python3/0027-Add-an-option-to-disable-uuid-module.patch > rename to package/python3/0023-Add-an-option-to-disable-uuid-module.patch > diff --git a/package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch b/package/python3/0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > similarity index 100% > rename from package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > rename to package/python3/0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > diff --git a/package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch b/package/python3/0025-Add-an-option-to-disable-the-berkeleydb-module.patch > similarity index 100% > rename from package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch > rename to package/python3/0025-Add-an-option-to-disable-the-berkeleydb-module.patch > diff --git a/package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch b/package/python3/0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > similarity index 100% > rename from package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > rename to package/python3/0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > diff --git a/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch b/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch > deleted file mode 100644 > index b6bfb010a0..0000000000 > --- a/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch > +++ /dev/null > @@ -1,53 +0,0 @@ > -From 755fb526a62df2a73560f42184db8aadb6899bb0 Mon Sep 17 00:00:00 2001 > -From: Matt Weber <matthew.weber@rockwellcollins.com> > -Date: Fri, 6 Oct 2017 09:54:15 -0500 > -Subject: [PATCH] python-config.sh: don't reassign ${prefix} > - > -When prefix is set to a path like /usr during crossbuild > -the sed operations end up executing twice, once for the prefix > -reassignment and another for includedir if it is set as a string > -including the ${prefix} variable. This results in an issue > -when the build directory is under /usr. > - > -This patch updates the remaining location which uses the prefix > -variable to also sed and update to use the real path. > - > -Upstream bug report: > -https://bugs.python.org/issue31713 > - > -Buildroot bug: > -https://bugs.busybox.net/show_bug.cgi?id=10361 > - > -Fixes failures like the following: > -dbus-python-1.2.4 | NOK | http://autobuild.buildroot.net/results/758858efa97b6273c1b470513f5492258a6d8853 > - > -Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> > ---- > - Misc/python-config.sh.in | 4 ++-- > - 1 file changed, 2 insertions(+), 2 deletions(-) > - > -diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in > -index a1bc3cd5f7..164d2d3603 100644 > ---- a/Misc/python-config.sh.in > -+++ b/Misc/python-config.sh.in > -@@ -31,7 +31,7 @@ prefix_real=$(installed_prefix "$0") > - # locations. Keep prefix & exec_prefix using their original values in case > - # they are referenced in other configure variables, to prevent double > - # substitution, issue #22140. > --prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#") > -+prefix=$prefix_build > - exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build#$prefix_real#") > - exec_prefix_real=${prefix_real} > - includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real#") > -@@ -49,7 +49,7 @@ LDLIBRARY="@LDLIBRARY@" > - OPT="@OPT@" > - PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" > - LDVERSION="@LDVERSION@" > --LIBDEST=${prefix_real}/lib/python${VERSION} > -+LIBDEST=$( echo "${prefix}/lib/python${VERSION}" | sed "s#^$prefix_build#$prefix_real#") > - LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#") > - SO="@EXT_SUFFIX@" > - PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" > --- > -2.34.1 > - > diff --git a/package/python3/0032-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch b/package/python3/0027-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch > similarity index 100% > rename from package/python3/0032-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch > rename to package/python3/0027-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch > diff --git a/package/python3/0028-fix-building-on-older-distributions.patch b/package/python3/0028-fix-building-on-older-distributions.patch > deleted file mode 100644 > index 4541b31c5f..0000000000 > --- a/package/python3/0028-fix-building-on-older-distributions.patch > +++ /dev/null > @@ -1,47 +0,0 @@ > -From e52e2c5e3df4bc3d2ff07ecb3b8e2a9099ea1631 Mon Sep 17 00:00:00 2001 > -From: Adam Duskett <aduskett@gmail.com> > -Date: Thu, 16 Aug 2018 14:52:37 -0700 > -Subject: [PATCH] fix building on older distributions > - > -Python > 3.6.3 calls os.replace in the update_file.py script, during the > -regen-importlib phase of the build process. > - > -According to Doc/whatsnew/3.3.rst line 1631, os.replace acts in the same > -way as os.rename, however, it is now cross-platform compatible for Windows. > - > -Because BuildRoot is guaranteed only to be built in POSIX environment, it is > -safe to change os.replace back to os.rename. > - > -This change fixes building on older systems such as CentOS7, that only come > -with python 2. > - > -Signed-off-by: Adam Duskett <aduskett@gmail.com> > ---- > - Tools/scripts/update_file.py | 4 ++-- > - 1 file changed, 2 insertions(+), 2 deletions(-) > - > -diff --git a/Tools/scripts/update_file.py b/Tools/scripts/update_file.py > -index b4182c1d0c..ab443cb1a6 100644 > ---- a/Tools/scripts/update_file.py > -+++ b/Tools/scripts/update_file.py > -@@ -53,7 +53,7 @@ def update_file_with_tmpfile(filename, tmpfile, *, create=False): > - if not create: > - raise # re-raise > - outcome = 'created' > -- os.replace(tmpfile, filename) > -+ os.rename(tmpfile, filename) > - else: > - with targetfile: > - old_contents = targetfile.read() > -@@ -62,7 +62,7 @@ def update_file_with_tmpfile(filename, tmpfile, *, create=False): > - # Now compare! > - if old_contents != new_contents: > - outcome = 'updated' > -- os.replace(tmpfile, filename) > -+ os.rename(tmpfile, filename) > - else: > - outcome = 'same' > - os.unlink(tmpfile) > --- > -2.34.1 > - > -- > 2.34.1 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/python3: drop unnecessary patches 2024-04-29 8:56 ` Yann E. MORIN @ 2024-04-29 14:48 ` Vincent Fazio 2024-04-29 17:57 ` Yann E. MORIN 0 siblings, 1 reply; 8+ messages in thread From: Vincent Fazio @ 2024-04-29 14:48 UTC (permalink / raw) To: Yann E. MORIN; +Cc: James Hilliard, Thomas Petazzoni, Asaf Kahlon, buildroot [-- Attachment #1.1: Type: text/plain, Size: 36876 bytes --] Yann, On Mon, Apr 29, 2024 at 3:57 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote: > Vincent, All, > > Thanks for tackling this python mess! > > On 2024-04-27 21:42 -0500, Vincent Fazio spake thusly: > > Patches 0004 and 0009 relied upon environment variables that were no > > longer set after python3-010-distutils-cross-compilation-support.patch > > was dropped during the transition to Python 3.4 in commit 0d327c26. > > 0004 and 0009 use the _python_sysroot env variable, and it is still set > in the environment when we build python packages: > > $ git grep -n _python_sysroot > package/pkg-python.mk:45: _python_sysroot=$(STAGING_DIR) \ > > It is totally possible that those patches are no longer needed for other > reasons, though, but not that one. > > Nice catch... I ran a build, some unit tests, and some old failing configs and didn't see issues so I will look at the history of these patches to see what caused their inclusion and see if I can either reproduce them or account for why they are no longer needed. For now, I will not plan to split them off since renumbering the patches is a PITA and I'd rather that only be done once. Regards, > Yann E. MORIN. > > > Patches 0010 and 0026 (see [0] [1] [2]) can be removed due to a fix > > introduced in 3.7 [3]. > > > > Patch 0029 can be dropped since commit 3fed4245 removed the dependency > > on a host provided python to build host-python3. > > > > [0]: https://github.com/python/cpython/issues/67096 > > [1]: https://github.com/python/cpython/issues/75894 > > [2]: https://github.com/python/cpython/issues/66338 > > [3]: > https://github.com/python/cpython/commit/14086cfc5eed8c5e78342d79e5db87a135d75fa8 > > > > Signed-off-by: Vincent Fazio <vfazio@gmail.com> > > --- > > .checkpackageignore | 51 +++++++------- > > ...y-header-paths-for-cross-compilation.patch | 69 ------------------- > > ...ok-in-usr-lib-termcap-for-libraries.patch} | 0 > > ...h => 0005-Don-t-add-multiarch-paths.patch} | 0 > > ...> 0006-Abort-on-failed-module-build.patch} | 0 > > ...tch => 0007-Serial-ioctl-workaround.patch} | 0 > > ...0008-Add-an-option-to-disable-pydoc.patch} | 0 > > ...09-Add-an-option-to-disable-lib2to3.patch} | 0 > > ...e-shebang-of-Python-scripts-for-cros.patch | 35 ---------- > > ...ption-to-disable-the-sqlite3-module.patch} | 0 > > ...ig.sh.in-ensure-sed-invocations-only.patch | 67 ------------------ > > ...-an-option-to-disable-the-tk-module.patch} | 0 > > ...option-to-disable-the-curses-module.patch} | 0 > > ...0013-Add-an-option-to-disable-expat.patch} | 0 > > ...Add-an-option-to-disable-CJK-codecs.patch} | 0 > > ...> 0015-Add-an-option-to-disable-NIS.patch} | 0 > > ...dd-an-option-to-disable-unicodedata.patch} | 0 > > ... 0017-Add-an-option-to-disable-IDLE.patch} | 0 > > ...18-Add-an-option-to-disable-decimal.patch} | 0 > > ...n-to-disable-the-ossaudiodev-module.patch} | 0 > > ...n-option-to-disable-openssl-support.patch} | 0 > > ...tion-to-disable-the-readline-module.patch} | 0 > > ...o-disable-zlib-bzip2-and-xz-modules.patch} | 0 > > ...dd-an-option-to-disable-uuid-module.patch} | 0 > > ...p-CC-print-multiarch-output-for-mus.patch} | 0 > > ...on-to-disable-the-berkeleydb-module.patch} | 0 > > ...ng-doesn-t-set-errno-when-encryptio.patch} | 0 > > ...thon-config.sh-don-t-reassign-prefix.patch | 53 -------------- > > ...ss-compiles-when-host-and-target-us.patch} | 0 > > ...-fix-building-on-older-distributions.patch | 47 ------------- > > 30 files changed, 23 insertions(+), 299 deletions(-) > > delete mode 100644 > package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch > > rename > package/python3/{0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch => > 0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch} (100%) > > rename package/python3/{0006-Don-t-add-multiarch-paths.patch => > 0005-Don-t-add-multiarch-paths.patch} (100%) > > rename package/python3/{0007-Abort-on-failed-module-build.patch => > 0006-Abort-on-failed-module-build.patch} (100%) > > rename package/python3/{0008-Serial-ioctl-workaround.patch => > 0007-Serial-ioctl-workaround.patch} (100%) > > rename package/python3/{0011-Add-an-option-to-disable-pydoc.patch => > 0008-Add-an-option-to-disable-pydoc.patch} (100%) > > rename package/python3/{0012-Add-an-option-to-disable-lib2to3.patch => > 0009-Add-an-option-to-disable-lib2to3.patch} (100%) > > delete mode 100644 > package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > > rename > package/python3/{0013-Add-option-to-disable-the-sqlite3-module.patch => > 0010-Add-option-to-disable-the-sqlite3-module.patch} (100%) > > delete mode 100644 > package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > > rename > package/python3/{0014-Add-an-option-to-disable-the-tk-module.patch => > 0011-Add-an-option-to-disable-the-tk-module.patch} (100%) > > rename > package/python3/{0015-Add-an-option-to-disable-the-curses-module.patch => > 0012-Add-an-option-to-disable-the-curses-module.patch} (100%) > > rename package/python3/{0016-Add-an-option-to-disable-expat.patch => > 0013-Add-an-option-to-disable-expat.patch} (100%) > > rename package/python3/{0017-Add-an-option-to-disable-CJK-codecs.patch > => 0014-Add-an-option-to-disable-CJK-codecs.patch} (100%) > > rename package/python3/{0018-Add-an-option-to-disable-NIS.patch => > 0015-Add-an-option-to-disable-NIS.patch} (100%) > > rename package/python3/{0019-Add-an-option-to-disable-unicodedata.patch > => 0016-Add-an-option-to-disable-unicodedata.patch} (100%) > > rename package/python3/{0020-Add-an-option-to-disable-IDLE.patch => > 0017-Add-an-option-to-disable-IDLE.patch} (100%) > > rename package/python3/{0021-Add-an-option-to-disable-decimal.patch => > 0018-Add-an-option-to-disable-decimal.patch} (100%) > > rename > package/python3/{0022-Add-an-option-to-disable-the-ossaudiodev-module.patch > => 0019-Add-an-option-to-disable-the-ossaudiodev-module.patch} (100%) > > rename > package/python3/{0023-Add-an-option-to-disable-openssl-support.patch => > 0020-Add-an-option-to-disable-openssl-support.patch} (100%) > > rename > package/python3/{0024-Add-an-option-to-disable-the-readline-module.patch => > 0021-Add-an-option-to-disable-the-readline-module.patch} (100%) > > rename > package/python3/{0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > => 0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch} (100%) > > rename package/python3/{0027-Add-an-option-to-disable-uuid-module.patch > => 0023-Add-an-option-to-disable-uuid-module.patch} (100%) > > rename > package/python3/{0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > => 0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch} (100%) > > rename > package/python3/{0030-Add-an-option-to-disable-the-berkeleydb-module.patch > => 0025-Add-an-option-to-disable-the-berkeleydb-module.patch} (100%) > > rename > package/python3/{0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > => 0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch} (100%) > > delete mode 100644 > package/python3/0026-python-config.sh-don-t-reassign-prefix.patch > > rename > package/python3/{0032-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch > => 0027-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch} (100%) > > delete mode 100644 > package/python3/0028-fix-building-on-older-distributions.patch > > > > diff --git a/.checkpackageignore b/.checkpackageignore > > index 1b336ce7a3..eec47fdaa4 100644 > > --- a/.checkpackageignore > > +++ b/.checkpackageignore > > @@ -1045,34 +1045,29 @@ > package/python-ws4py/0001-Adjust-ws4py-for-Python-3.7-syntax.patch > lib_patch.Ups > > package/python3/0001-Make-the-build-of-pyc-files-conditional.patch > lib_patch.Upstream > > > package/python3/0002-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch > lib_patch.Upstream > > > package/python3/0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch > lib_patch.Upstream > > > -package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch > lib_patch.Upstream > > -package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch > lib_patch.Upstream > > -package/python3/0006-Don-t-add-multiarch-paths.patch lib_patch.Upstream > > -package/python3/0007-Abort-on-failed-module-build.patch > lib_patch.Upstream > > -package/python3/0008-Serial-ioctl-workaround.patch lib_patch.Upstream > > > -package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > lib_patch.Upstream > > > -package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > lib_patch.Upstream > > -package/python3/0011-Add-an-option-to-disable-pydoc.patch > lib_patch.Upstream > > -package/python3/0012-Add-an-option-to-disable-lib2to3.patch > lib_patch.Upstream > > -package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch > lib_patch.Upstream > > -package/python3/0014-Add-an-option-to-disable-the-tk-module.patch > lib_patch.Upstream > > -package/python3/0015-Add-an-option-to-disable-the-curses-module.patch > lib_patch.Upstream > > -package/python3/0016-Add-an-option-to-disable-expat.patch > lib_patch.Upstream > > -package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch > lib_patch.Upstream > > -package/python3/0018-Add-an-option-to-disable-NIS.patch > lib_patch.Upstream > > -package/python3/0019-Add-an-option-to-disable-unicodedata.patch > lib_patch.Upstream > > -package/python3/0020-Add-an-option-to-disable-IDLE.patch > lib_patch.Upstream > > -package/python3/0021-Add-an-option-to-disable-decimal.patch > lib_patch.Upstream > > > -package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch > lib_patch.Upstream > > -package/python3/0023-Add-an-option-to-disable-openssl-support.patch > lib_patch.Upstream > > -package/python3/0024-Add-an-option-to-disable-the-readline-module.patch > lib_patch.Upstream > > > -package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > lib_patch.Upstream > > -package/python3/0026-python-config.sh-don-t-reassign-prefix.patch > lib_patch.Upstream > > -package/python3/0027-Add-an-option-to-disable-uuid-module.patch > lib_patch.Upstream > > -package/python3/0028-fix-building-on-older-distributions.patch > lib_patch.Upstream > > > -package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > lib_patch.Upstream > > > -package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch > lib_patch.Upstream > > > -package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > lib_patch.Upstream > > +package/python3/0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch > lib_patch.Upstream > > +package/python3/0005-Don-t-add-multiarch-paths.patch lib_patch.Upstream > > +package/python3/0006-Abort-on-failed-module-build.patch > lib_patch.Upstream > > +package/python3/0007-Serial-ioctl-workaround.patch lib_patch.Upstream > > +package/python3/0008-Add-an-option-to-disable-pydoc.patch > lib_patch.Upstream > > +package/python3/0009-Add-an-option-to-disable-lib2to3.patch > lib_patch.Upstream > > +package/python3/0010-Add-option-to-disable-the-sqlite3-module.patch > lib_patch.Upstream > > +package/python3/0011-Add-an-option-to-disable-the-tk-module.patch > lib_patch.Upstream > > +package/python3/0012-Add-an-option-to-disable-the-curses-module.patch > lib_patch.Upstream > > +package/python3/0013-Add-an-option-to-disable-expat.patch > lib_patch.Upstream > > +package/python3/0014-Add-an-option-to-disable-CJK-codecs.patch > lib_patch.Upstream > > +package/python3/0015-Add-an-option-to-disable-NIS.patch > lib_patch.Upstream > > +package/python3/0016-Add-an-option-to-disable-unicodedata.patch > lib_patch.Upstream > > +package/python3/0017-Add-an-option-to-disable-IDLE.patch > lib_patch.Upstream > > +package/python3/0018-Add-an-option-to-disable-decimal.patch > lib_patch.Upstream > > > +package/python3/0019-Add-an-option-to-disable-the-ossaudiodev-module.patch > lib_patch.Upstream > > +package/python3/0020-Add-an-option-to-disable-openssl-support.patch > lib_patch.Upstream > > +package/python3/0021-Add-an-option-to-disable-the-readline-module.patch > lib_patch.Upstream > > > +package/python3/0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > lib_patch.Upstream > > +package/python3/0023-Add-an-option-to-disable-uuid-module.patch > lib_patch.Upstream > > > +package/python3/0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > lib_patch.Upstream > > > +package/python3/0025-Add-an-option-to-disable-the-berkeleydb-module.patch > lib_patch.Upstream > > > +package/python3/0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > lib_patch.Upstream > > package/qemu/0001-tests-fp-disable-fp-bench-build-by-default.patch > lib_patch.Upstream > > > package/qemu/0002-softmmu-qemu-seccomp.c-add-missing-header-for-CLONE_.patch > lib_patch.Upstream > > > package/qextserialport/0001-Create-a-main-include-file-QExtSerialPort.patch > lib_patch.Upstream > > diff --git > a/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch > b/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch > > deleted file mode 100644 > > index 9a55d2582d..0000000000 > > --- > a/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch > > +++ /dev/null > > @@ -1,69 +0,0 @@ > > -From 132b9dca3bb4d4682f7e318648ce11e1abb31b62 Mon Sep 17 00:00:00 2001 > > -From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > > -Date: Wed, 23 Dec 2015 11:33:14 +0100 > > -Subject: [PATCH] Adjust library/header paths for cross-compilation > > - > > -When cross-compiling third-party extensions, the get_python_inc() or > > -get_python_lib() can be called, to return the path to headers or > > -libraries. However, they use the sys.prefix of the host Python, which > > -returns incorrect paths when cross-compiling (paths pointing to host > > -headers and libraries). > > - > > -In order to fix this, we introduce the _python_sysroot, _python_prefix > > -and _python_exec_prefix variables, that allow to override these > > -values, and get correct header/library paths when cross-compiling > > -third-party Python modules. > > - > > -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > > -Signed-off-by: Adam Duskett <aduskett@gmail.com> > > -Refresh for 3.10.0 > > ---- > > - Lib/distutils/command/build_ext.py | 5 ++++- > > - Lib/sysconfig.py | 15 +++++++++++---- > > - 2 files changed, 15 insertions(+), 5 deletions(-) > > - > > -diff --git a/Lib/distutils/command/build_ext.py > b/Lib/distutils/command/build_ext.py > > -index f287b34998..298234d6a1 100644 > > ---- a/Lib/distutils/command/build_ext.py > > -+++ b/Lib/distutils/command/build_ext.py > > -@@ -234,7 +234,10 @@ def finalize_options(self): > > - if (sysconfig.get_config_var('Py_ENABLE_SHARED')): > > - if not sysconfig.python_build: > > - # building third party extensions > > -- > self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) > > -+ libdir = sysconfig.get_config_var('LIBDIR') > > -+ if "_python_sysroot" in os.environ: > > -+ libdir = os.environ.get("_python_sysroot") + libdir > > -+ self.library_dirs.append(libdir) > > - else: > > - # building python standard extensions > > - self.library_dirs.append('.') > > -diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py > > -index ebe3711827..6328ec41af 100644 > > ---- a/Lib/sysconfig.py > > -+++ b/Lib/sysconfig.py > > -@@ -168,10 +168,17 @@ def joinuser(*args): > > - _PY_VERSION = sys.version.split()[0] > > - _PY_VERSION_SHORT = f'{sys.version_info[0]}.{sys.version_info[1]}' > > - _PY_VERSION_SHORT_NO_DOT = > f'{sys.version_info[0]}{sys.version_info[1]}' > > --_PREFIX = os.path.normpath(sys.prefix) > > --_BASE_PREFIX = os.path.normpath(sys.base_prefix) > > --_EXEC_PREFIX = os.path.normpath(sys.exec_prefix) > > --_BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) > > -+if "_python_sysroot" in os.environ: > > -+ _sysroot=os.environ.get('_python_sysroot') > > -+ _PREFIX = os.path.normpath(_sysroot + > os.environ.get('_python_prefix')) > > -+ _EXEC_PREFIX = os.path.normpath(_sysroot + > os.environ.get('_python_exec_prefix')) > > -+ _BASE_PREFIX = _PREFIX > > -+ _BASE_EXEC_PREFIX = _EXEC_PREFIX > > -+else: > > -+ _PREFIX = os.path.normpath(sys.prefix) > > -+ _EXEC_PREFIX = os.path.normpath(sys.exec_prefix) > > -+ _BASE_PREFIX = os.path.normpath(sys.base_prefix) > > -+ _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) > > - _CONFIG_VARS = None > > - _USER_BASE = None > > - > > --- > > -2.34.1 > > - > > diff --git > a/package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch > b/package/python3/0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch > > similarity index 100% > > rename from > package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch > > rename to > package/python3/0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch > > diff --git a/package/python3/0006-Don-t-add-multiarch-paths.patch > b/package/python3/0005-Don-t-add-multiarch-paths.patch > > similarity index 100% > > rename from package/python3/0006-Don-t-add-multiarch-paths.patch > > rename to package/python3/0005-Don-t-add-multiarch-paths.patch > > diff --git a/package/python3/0007-Abort-on-failed-module-build.patch > b/package/python3/0006-Abort-on-failed-module-build.patch > > similarity index 100% > > rename from package/python3/0007-Abort-on-failed-module-build.patch > > rename to package/python3/0006-Abort-on-failed-module-build.patch > > diff --git a/package/python3/0008-Serial-ioctl-workaround.patch > b/package/python3/0007-Serial-ioctl-workaround.patch > > similarity index 100% > > rename from package/python3/0008-Serial-ioctl-workaround.patch > > rename to package/python3/0007-Serial-ioctl-workaround.patch > > diff --git a/package/python3/0011-Add-an-option-to-disable-pydoc.patch > b/package/python3/0008-Add-an-option-to-disable-pydoc.patch > > similarity index 100% > > rename from package/python3/0011-Add-an-option-to-disable-pydoc.patch > > rename to package/python3/0008-Add-an-option-to-disable-pydoc.patch > > diff --git a/package/python3/0012-Add-an-option-to-disable-lib2to3.patch > b/package/python3/0009-Add-an-option-to-disable-lib2to3.patch > > similarity index 100% > > rename from package/python3/0012-Add-an-option-to-disable-lib2to3.patch > > rename to package/python3/0009-Add-an-option-to-disable-lib2to3.patch > > diff --git > a/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > b/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > > deleted file mode 100644 > > index eff8fc7694..0000000000 > > --- > a/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > > +++ /dev/null > > @@ -1,35 +0,0 @@ > > -From 2439bd2ed5dbdd7e5fda15adefd0f6f1b047ec1b Mon Sep 17 00:00:00 2001 > > -From: Christophe Vu-Brugier <cvubrugier@fastmail.fm> > > -Date: Wed, 23 Dec 2015 11:44:30 +0100 > > -Subject: [PATCH] Do not adjust the shebang of Python scripts for > > - cross-compilation > > - > > -The copy_scripts() method in distutils copies the scripts listed in > > -the setup file and adjusts the first line to refer to the current > > -Python interpreter. When cross-compiling, this means that the adjusted > > -shebang refers to the host Python interpreter. > > - > > -This patch modifies copy_scripts() to preserve the shebang when > > -cross-compilation is detected. > > - > > -Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm> > > ---- > > - Lib/distutils/command/build_scripts.py | 2 +- > > - 1 file changed, 1 insertion(+), 1 deletion(-) > > - > > -diff --git a/Lib/distutils/command/build_scripts.py > b/Lib/distutils/command/build_scripts.py > > -index ccc70e6465..d6d54195c1 100644 > > ---- a/Lib/distutils/command/build_scripts.py > > -+++ b/Lib/distutils/command/build_scripts.py > > -@@ -91,7 +91,7 @@ def copy_scripts(self): > > - adjust = True > > - post_interp = match.group(1) or b'' > > - > > -- if adjust: > > -+ if adjust and not '_python_sysroot' in os.environ: > > - log.info("copying and adjusting %s -> %s", script, > > - self.build_dir) > > - updated_files.append(outfile) > > --- > > -2.34.1 > > - > > diff --git > a/package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch > b/package/python3/0010-Add-option-to-disable-the-sqlite3-module.patch > > similarity index 100% > > rename from > package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch > > rename to > package/python3/0010-Add-option-to-disable-the-sqlite3-module.patch > > diff --git > a/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > b/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > > deleted file mode 100644 > > index f26ee85b61..0000000000 > > --- > a/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > > +++ /dev/null > > @@ -1,67 +0,0 @@ > > -From 55ef5552e4ee60266e3299f253bec3b13785e585 Mon Sep 17 00:00:00 2001 > > -From: Peter Korsgaard <peter@korsgaard.com> > > -Date: Thu, 20 Nov 2014 13:24:59 +0100 > > -Subject: [PATCH] Misc/python-config.sh.in: ensure sed invocations only > match > > - beginning of strings > > - > > -The build/real prefix handling using sed breaks if build != real and the > > -standard include / lib directories are used ($prefix/include and > $prefix/lib). > > - > > -E.G. > > - > > -prefix_build="/usr", libdir="$prefix/lib", includedir="$prefix/include". > > - > > -If this gets installed with make DESTDIR="/foo" install, then we end up > with > > -prefix_real = prefix = "/foo/usr" as expected, but > > -includedir="/foo/foo/usr/include" and libdir="/foo/foo/usr/lib" because > of > > -the double sed invocation (prefix is already expanded). Work around it > by > > -ensuring we only match the beginning of the string. > > - > > -Submitted upstream: http://bugs.python.org/issue22907 > > - > > -Signed-off-by: Peter Korsgaard <peter@korsgaard.com> > > ---- > > - Misc/python-config.sh.in | 13 +++++++------ > > - 1 file changed, 7 insertions(+), 6 deletions(-) > > - > > -diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in > > -index 2602fe24c0..a1bc3cd5f7 100644 > > ---- a/Misc/python-config.sh.in > > -+++ b/Misc/python-config.sh.in > > -@@ -24,18 +24,19 @@ installed_prefix () > > - echo $RESULT > > - } > > - > > -+prefix_build="@prefix@" > > - prefix_real=$(installed_prefix "$0") > > - > > - # Use sed to fix paths from their built-to locations to their > installed-to > > - # locations. Keep prefix & exec_prefix using their original values in > case > > - # they are referenced in other configure variables, to prevent double > > - # substitution, issue #22140. > > --prefix="@prefix@" > > --exec_prefix="@exec_prefix@" > > -+prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#") > > -+exec_prefix=$(echo "$exec_prefix_build" | sed > "s#^$exec_prefix_build#$prefix_real#") > > - exec_prefix_real=${prefix_real} > > --includedir=$(echo "@includedir@" | sed "s#$prefix#$prefix_real#") > > --libdir=$(echo "@libdir@" | sed "s#$prefix#$prefix_real#") > > --CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix#$prefix_real#") > > -+includedir=$(echo "@includedir@" | sed > "s#^$prefix_build#$prefix_real#") > > -+libdir=$(echo "@libdir@" | sed "s#^$prefix_build#$prefix_real#") > > -+CFLAGS=$(echo "@CFLAGS@" | sed "s#^$prefix_build#$prefix_real#") > > - VERSION="@VERSION@" > > - LIBM="@LIBM@" > > - LIBC="@LIBC@" > > -@@ -49,7 +50,7 @@ OPT="@OPT@" > > - PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" > > - LDVERSION="@LDVERSION@" > > - LIBDEST=${prefix_real}/lib/python${VERSION} > > --LIBPL=$(echo "@LIBPL@" | sed "s#$prefix#$prefix_real#") > > -+LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#") > > - SO="@EXT_SUFFIX@" > > - PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" > > - INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" > > --- > > -2.34.1 > > - > > diff --git > a/package/python3/0014-Add-an-option-to-disable-the-tk-module.patch > b/package/python3/0011-Add-an-option-to-disable-the-tk-module.patch > > similarity index 100% > > rename from > package/python3/0014-Add-an-option-to-disable-the-tk-module.patch > > rename to > package/python3/0011-Add-an-option-to-disable-the-tk-module.patch > > diff --git > a/package/python3/0015-Add-an-option-to-disable-the-curses-module.patch > b/package/python3/0012-Add-an-option-to-disable-the-curses-module.patch > > similarity index 100% > > rename from > package/python3/0015-Add-an-option-to-disable-the-curses-module.patch > > rename to > package/python3/0012-Add-an-option-to-disable-the-curses-module.patch > > diff --git a/package/python3/0016-Add-an-option-to-disable-expat.patch > b/package/python3/0013-Add-an-option-to-disable-expat.patch > > similarity index 100% > > rename from package/python3/0016-Add-an-option-to-disable-expat.patch > > rename to package/python3/0013-Add-an-option-to-disable-expat.patch > > diff --git > a/package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch > b/package/python3/0014-Add-an-option-to-disable-CJK-codecs.patch > > similarity index 100% > > rename from > package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch > > rename to package/python3/0014-Add-an-option-to-disable-CJK-codecs.patch > > diff --git a/package/python3/0018-Add-an-option-to-disable-NIS.patch > b/package/python3/0015-Add-an-option-to-disable-NIS.patch > > similarity index 100% > > rename from package/python3/0018-Add-an-option-to-disable-NIS.patch > > rename to package/python3/0015-Add-an-option-to-disable-NIS.patch > > diff --git > a/package/python3/0019-Add-an-option-to-disable-unicodedata.patch > b/package/python3/0016-Add-an-option-to-disable-unicodedata.patch > > similarity index 100% > > rename from > package/python3/0019-Add-an-option-to-disable-unicodedata.patch > > rename to package/python3/0016-Add-an-option-to-disable-unicodedata.patch > > diff --git a/package/python3/0020-Add-an-option-to-disable-IDLE.patch > b/package/python3/0017-Add-an-option-to-disable-IDLE.patch > > similarity index 100% > > rename from package/python3/0020-Add-an-option-to-disable-IDLE.patch > > rename to package/python3/0017-Add-an-option-to-disable-IDLE.patch > > diff --git a/package/python3/0021-Add-an-option-to-disable-decimal.patch > b/package/python3/0018-Add-an-option-to-disable-decimal.patch > > similarity index 100% > > rename from package/python3/0021-Add-an-option-to-disable-decimal.patch > > rename to package/python3/0018-Add-an-option-to-disable-decimal.patch > > diff --git > a/package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch > b/package/python3/0019-Add-an-option-to-disable-the-ossaudiodev-module.patch > > similarity index 100% > > rename from > package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch > > rename to > package/python3/0019-Add-an-option-to-disable-the-ossaudiodev-module.patch > > diff --git > a/package/python3/0023-Add-an-option-to-disable-openssl-support.patch > b/package/python3/0020-Add-an-option-to-disable-openssl-support.patch > > similarity index 100% > > rename from > package/python3/0023-Add-an-option-to-disable-openssl-support.patch > > rename to > package/python3/0020-Add-an-option-to-disable-openssl-support.patch > > diff --git > a/package/python3/0024-Add-an-option-to-disable-the-readline-module.patch > b/package/python3/0021-Add-an-option-to-disable-the-readline-module.patch > > similarity index 100% > > rename from > package/python3/0024-Add-an-option-to-disable-the-readline-module.patch > > rename to > package/python3/0021-Add-an-option-to-disable-the-readline-module.patch > > diff --git > a/package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > b/package/python3/0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > > similarity index 100% > > rename from > package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > > rename to > package/python3/0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > > diff --git > a/package/python3/0027-Add-an-option-to-disable-uuid-module.patch > b/package/python3/0023-Add-an-option-to-disable-uuid-module.patch > > similarity index 100% > > rename from > package/python3/0027-Add-an-option-to-disable-uuid-module.patch > > rename to package/python3/0023-Add-an-option-to-disable-uuid-module.patch > > diff --git > a/package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > b/package/python3/0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > > similarity index 100% > > rename from > package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > > rename to > package/python3/0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > > diff --git > a/package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch > b/package/python3/0025-Add-an-option-to-disable-the-berkeleydb-module.patch > > similarity index 100% > > rename from > package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch > > rename to > package/python3/0025-Add-an-option-to-disable-the-berkeleydb-module.patch > > diff --git > a/package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > b/package/python3/0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > > similarity index 100% > > rename from > package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > > rename to > package/python3/0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > > diff --git > a/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch > b/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch > > deleted file mode 100644 > > index b6bfb010a0..0000000000 > > --- a/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch > > +++ /dev/null > > @@ -1,53 +0,0 @@ > > -From 755fb526a62df2a73560f42184db8aadb6899bb0 Mon Sep 17 00:00:00 2001 > > -From: Matt Weber <matthew.weber@rockwellcollins.com> > > -Date: Fri, 6 Oct 2017 09:54:15 -0500 > > -Subject: [PATCH] python-config.sh: don't reassign ${prefix} > > - > > -When prefix is set to a path like /usr during crossbuild > > -the sed operations end up executing twice, once for the prefix > > -reassignment and another for includedir if it is set as a string > > -including the ${prefix} variable. This results in an issue > > -when the build directory is under /usr. > > - > > -This patch updates the remaining location which uses the prefix > > -variable to also sed and update to use the real path. > > - > > -Upstream bug report: > > -https://bugs.python.org/issue31713 > > - > > -Buildroot bug: > > -https://bugs.busybox.net/show_bug.cgi?id=10361 > > - > > -Fixes failures like the following: > > -dbus-python-1.2.4 | NOK | > http://autobuild.buildroot.net/results/758858efa97b6273c1b470513f5492258a6d8853 > > - > > -Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> > > ---- > > - Misc/python-config.sh.in | 4 ++-- > > - 1 file changed, 2 insertions(+), 2 deletions(-) > > - > > -diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in > > -index a1bc3cd5f7..164d2d3603 100644 > > ---- a/Misc/python-config.sh.in > > -+++ b/Misc/python-config.sh.in > > -@@ -31,7 +31,7 @@ prefix_real=$(installed_prefix "$0") > > - # locations. Keep prefix & exec_prefix using their original values in > case > > - # they are referenced in other configure variables, to prevent double > > - # substitution, issue #22140. > > --prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#") > > -+prefix=$prefix_build > > - exec_prefix=$(echo "$exec_prefix_build" | sed > "s#^$exec_prefix_build#$prefix_real#") > > - exec_prefix_real=${prefix_real} > > - includedir=$(echo "@includedir@" | sed > "s#^$prefix_build#$prefix_real#") > > -@@ -49,7 +49,7 @@ LDLIBRARY="@LDLIBRARY@" > > - OPT="@OPT@" > > - PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" > > - LDVERSION="@LDVERSION@" > > --LIBDEST=${prefix_real}/lib/python${VERSION} > > -+LIBDEST=$( echo "${prefix}/lib/python${VERSION}" | sed > "s#^$prefix_build#$prefix_real#") > > - LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#") > > - SO="@EXT_SUFFIX@" > > - PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" > > --- > > -2.34.1 > > - > > diff --git > a/package/python3/0032-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch > b/package/python3/0027-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch > > similarity index 100% > > rename from > package/python3/0032-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch > > rename to > package/python3/0027-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch > > diff --git > a/package/python3/0028-fix-building-on-older-distributions.patch > b/package/python3/0028-fix-building-on-older-distributions.patch > > deleted file mode 100644 > > index 4541b31c5f..0000000000 > > --- a/package/python3/0028-fix-building-on-older-distributions.patch > > +++ /dev/null > > @@ -1,47 +0,0 @@ > > -From e52e2c5e3df4bc3d2ff07ecb3b8e2a9099ea1631 Mon Sep 17 00:00:00 2001 > > -From: Adam Duskett <aduskett@gmail.com> > > -Date: Thu, 16 Aug 2018 14:52:37 -0700 > > -Subject: [PATCH] fix building on older distributions > > - > > -Python > 3.6.3 calls os.replace in the update_file.py script, during the > > -regen-importlib phase of the build process. > > - > > -According to Doc/whatsnew/3.3.rst line 1631, os.replace acts in the same > > -way as os.rename, however, it is now cross-platform compatible for > Windows. > > - > > -Because BuildRoot is guaranteed only to be built in POSIX environment, > it is > > -safe to change os.replace back to os.rename. > > - > > -This change fixes building on older systems such as CentOS7, that only > come > > -with python 2. > > - > > -Signed-off-by: Adam Duskett <aduskett@gmail.com> > > ---- > > - Tools/scripts/update_file.py | 4 ++-- > > - 1 file changed, 2 insertions(+), 2 deletions(-) > > - > > -diff --git a/Tools/scripts/update_file.py b/Tools/scripts/update_file.py > > -index b4182c1d0c..ab443cb1a6 100644 > > ---- a/Tools/scripts/update_file.py > > -+++ b/Tools/scripts/update_file.py > > -@@ -53,7 +53,7 @@ def update_file_with_tmpfile(filename, tmpfile, *, > create=False): > > - if not create: > > - raise # re-raise > > - outcome = 'created' > > -- os.replace(tmpfile, filename) > > -+ os.rename(tmpfile, filename) > > - else: > > - with targetfile: > > - old_contents = targetfile.read() > > -@@ -62,7 +62,7 @@ def update_file_with_tmpfile(filename, tmpfile, *, > create=False): > > - # Now compare! > > - if old_contents != new_contents: > > - outcome = 'updated' > > -- os.replace(tmpfile, filename) > > -+ os.rename(tmpfile, filename) > > - else: > > - outcome = 'same' > > - os.unlink(tmpfile) > > --- > > -2.34.1 > > - > > -- > > 2.34.1 > > > > _______________________________________________ > > buildroot mailing list > > buildroot@buildroot.org > > https://lists.buildroot.org/mailman/listinfo/buildroot > > -- > > .-----------------.--------------------.------------------.--------------------. > | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' > conspiracy: | > | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ > | > | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is > no | > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v > conspiracy. | > > '------------------------------^-------^------------------^--------------------' > [-- Attachment #1.2: Type: text/html, Size: 43585 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/python3: drop unnecessary patches 2024-04-29 14:48 ` Vincent Fazio @ 2024-04-29 17:57 ` Yann E. MORIN 0 siblings, 0 replies; 8+ messages in thread From: Yann E. MORIN @ 2024-04-29 17:57 UTC (permalink / raw) To: Vincent Fazio; +Cc: James Hilliard, Thomas Petazzoni, Asaf Kahlon, buildroot Vincent, All, On 2024-04-29 09:48 -0500, Vincent Fazio spake thusly: > On Mon, Apr 29, 2024 at 3:57 AM Yann E. MORIN <[1]yann.morin.1998@free.fr> > wrote: > > On 2024-04-27 21:42 -0500, Vincent Fazio spake thusly: > > > Patches 0004 and 0009 relied upon environment variables that were no > > > longer set after python3-010-distutils-cross-compilation-support.patch > > > was dropped during the transition to Python 3.4 in commit 0d327c26. > > 0004 and 0009 use the _python_sysroot env variable, and it is still set > > in the environment when we build python packages: > Nice catch... I ran a build, some unit tests, and some old failing configs and > didn't see issues so I will look at the history of these patches to see what > caused their inclusion and see if I can either reproduce them or account for > why they are no longer needed. Yeah, this is going to be very usefull if we can drop them. I think that we could argue that, if all our runtime test for python packages pass (build and run), then this is a good indication that those are no longer required, and if the commit log introducing them does not explain the reason, then I think it is fine to drop them. > For now, I will not plan to split them off since renumbering the patches is a > PITA and I'd rather that only be done once. I would find it quite acceptable thati, for a package with some many patches, one only drops patches and sends that as an RFC, and if that all turns out OK, then either the committer does the rename when applying, or you do it in a v2. This has the side advantage of reducing the churn when reviewing the change. Thank you again! :-) Regards, Yann E. MORIN. > Regards, > Yann E. MORIN. > > > Patches 0010 and 0026 (see [0] [1] [2]) can be removed due to a fix > > introduced in 3.7 [3]. > > > > Patch 0029 can be dropped since commit 3fed4245 removed the dependency > > on a host provided python to build host-python3. > > > > [0]: [3]https://github.com/python/cpython/issues/67096 > > [1]: [4]https://github.com/python/cpython/issues/75894 > > [2]: [5]https://github.com/python/cpython/issues/66338 > > [3]: [6]https://github.com/python/cpython/commit/ > 14086cfc5eed8c5e78342d79e5db87a135d75fa8 > > > > Signed-off-by: Vincent Fazio <[7]vfazio@gmail.com> > > --- > > .checkpackageignore | 51 +++++++------- > > ...y-header-paths-for-cross-compilation.patch | 69 ------------------- > > ...ok-in-usr-lib-termcap-for-libraries.patch} | 0 > > ...h => 0005-Don-t-add-multiarch-paths.patch} | 0 > > ...> 0006-Abort-on-failed-module-build.patch} | 0 > > ...tch => 0007-Serial-ioctl-workaround.patch} | 0 > > ...0008-Add-an-option-to-disable-pydoc.patch} | 0 > > ...09-Add-an-option-to-disable-lib2to3.patch} | 0 > > ...e-shebang-of-Python-scripts-for-cros.patch | 35 ---------- > > ...ption-to-disable-the-sqlite3-module.patch} | 0 > > ...ig.sh.in-ensure-sed-invocations-only.patch | 67 ------------------ > > ...-an-option-to-disable-the-tk-module.patch} | 0 > > ...option-to-disable-the-curses-module.patch} | 0 > > ...0013-Add-an-option-to-disable-expat.patch} | 0 > > ...Add-an-option-to-disable-CJK-codecs.patch} | 0 > > ...> 0015-Add-an-option-to-disable-NIS.patch} | 0 > > ...dd-an-option-to-disable-unicodedata.patch} | 0 > > ... 0017-Add-an-option-to-disable-IDLE.patch} | 0 > > ...18-Add-an-option-to-disable-decimal.patch} | 0 > > ...n-to-disable-the-ossaudiodev-module.patch} | 0 > > ...n-option-to-disable-openssl-support.patch} | 0 > > ...tion-to-disable-the-readline-module.patch} | 0 > > ...o-disable-zlib-bzip2-and-xz-modules.patch} | 0 > > ...dd-an-option-to-disable-uuid-module.patch} | 0 > > ...p-CC-print-multiarch-output-for-mus.patch} | 0 > > ...on-to-disable-the-berkeleydb-module.patch} | 0 > > ...ng-doesn-t-set-errno-when-encryptio.patch} | 0 > > ...thon-config.sh-don-t-reassign-prefix.patch | 53 -------------- > > ...ss-compiles-when-host-and-target-us.patch} | 0 > > ...-fix-building-on-older-distributions.patch | 47 ------------- > > 30 files changed, 23 insertions(+), 299 deletions(-) > > delete mode 100644 package/python3/ > 0004-Adjust-library-header-paths-for-cross-compilation.patch > > rename package/python3/ > {0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch => > 0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch} (100%) > > rename package/python3/{0006-Don-t-add-multiarch-paths.patch => > 0005-Don-t-add-multiarch-paths.patch} (100%) > > rename package/python3/{0007-Abort-on-failed-module-build.patch => > 0006-Abort-on-failed-module-build.patch} (100%) > > rename package/python3/{0008-Serial-ioctl-workaround.patch => > 0007-Serial-ioctl-workaround.patch} (100%) > > rename package/python3/{0011-Add-an-option-to-disable-pydoc.patch => > 0008-Add-an-option-to-disable-pydoc.patch} (100%) > > rename package/python3/{0012-Add-an-option-to-disable-lib2to3.patch => > 0009-Add-an-option-to-disable-lib2to3.patch} (100%) > > delete mode 100644 package/python3/ > 0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > > rename package/python3/ > {0013-Add-option-to-disable-the-sqlite3-module.patch => > 0010-Add-option-to-disable-the-sqlite3-module.patch} (100%) > > delete mode 100644 package/python3/ > 0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > > rename package/python3/ > {0014-Add-an-option-to-disable-the-tk-module.patch => > 0011-Add-an-option-to-disable-the-tk-module.patch} (100%) > > rename package/python3/ > {0015-Add-an-option-to-disable-the-curses-module.patch => > 0012-Add-an-option-to-disable-the-curses-module.patch} (100%) > > rename package/python3/{0016-Add-an-option-to-disable-expat.patch => > 0013-Add-an-option-to-disable-expat.patch} (100%) > > rename package/python3/{0017-Add-an-option-to-disable-CJK-codecs.patch > => 0014-Add-an-option-to-disable-CJK-codecs.patch} (100%) > > rename package/python3/{0018-Add-an-option-to-disable-NIS.patch => > 0015-Add-an-option-to-disable-NIS.patch} (100%) > > rename package/python3/{0019-Add-an-option-to-disable-unicodedata.patch > => 0016-Add-an-option-to-disable-unicodedata.patch} (100%) > > rename package/python3/{0020-Add-an-option-to-disable-IDLE.patch => > 0017-Add-an-option-to-disable-IDLE.patch} (100%) > > rename package/python3/{0021-Add-an-option-to-disable-decimal.patch => > 0018-Add-an-option-to-disable-decimal.patch} (100%) > > rename package/python3/ > {0022-Add-an-option-to-disable-the-ossaudiodev-module.patch => > 0019-Add-an-option-to-disable-the-ossaudiodev-module.patch} (100%) > > rename package/python3/ > {0023-Add-an-option-to-disable-openssl-support.patch => > 0020-Add-an-option-to-disable-openssl-support.patch} (100%) > > rename package/python3/ > {0024-Add-an-option-to-disable-the-readline-module.patch => > 0021-Add-an-option-to-disable-the-readline-module.patch} (100%) > > rename package/python3/ > {0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch => > 0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch} (100%) > > rename package/python3/{0027-Add-an-option-to-disable-uuid-module.patch > => 0023-Add-an-option-to-disable-uuid-module.patch} (100%) > > rename package/python3/ > {0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch => > 0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch} (100%) > > rename package/python3/ > {0030-Add-an-option-to-disable-the-berkeleydb-module.patch => > 0025-Add-an-option-to-disable-the-berkeleydb-module.patch} (100%) > > rename package/python3/ > {0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch => > 0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch} (100%) > > delete mode 100644 package/python3/ > 0026-python-config.sh-don-t-reassign-prefix.patch > > rename package/python3/ > {0032-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch => > 0027-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch} (100%) > > delete mode 100644 package/python3/ > 0028-fix-building-on-older-distributions.patch > > > > diff --git a/.checkpackageignore b/.checkpackageignore > > index 1b336ce7a3..eec47fdaa4 100644 > > --- a/.checkpackageignore > > +++ b/.checkpackageignore > > @@ -1045,34 +1045,29 @@ package/python-ws4py/ > 0001-Adjust-ws4py-for-Python-3.7-syntax.patch lib_patch.Ups > > package/python3/0001-Make-the-build-of-pyc-files-conditional.patch > lib_patch.Upstream > > package/python3/ > 0002-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch > lib_patch.Upstream > > package/python3/ > 0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch > lib_patch.Upstream > > -package/python3/ > 0004-Adjust-library-header-paths-for-cross-compilation.patch > lib_patch.Upstream > > -package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch > lib_patch.Upstream > > -package/python3/0006-Don-t-add-multiarch-paths.patch lib_patch.Upstream > > -package/python3/0007-Abort-on-failed-module-build.patch > lib_patch.Upstream > > -package/python3/0008-Serial-ioctl-workaround.patch lib_patch.Upstream > > -package/python3/ > 0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > lib_patch.Upstream > > -package/python3/ > 0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > lib_patch.Upstream > > -package/python3/0011-Add-an-option-to-disable-pydoc.patch > lib_patch.Upstream > > -package/python3/0012-Add-an-option-to-disable-lib2to3.patch > lib_patch.Upstream > > -package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch > lib_patch.Upstream > > -package/python3/0014-Add-an-option-to-disable-the-tk-module.patch > lib_patch.Upstream > > -package/python3/0015-Add-an-option-to-disable-the-curses-module.patch > lib_patch.Upstream > > -package/python3/0016-Add-an-option-to-disable-expat.patch > lib_patch.Upstream > > -package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch > lib_patch.Upstream > > -package/python3/0018-Add-an-option-to-disable-NIS.patch > lib_patch.Upstream > > -package/python3/0019-Add-an-option-to-disable-unicodedata.patch > lib_patch.Upstream > > -package/python3/0020-Add-an-option-to-disable-IDLE.patch > lib_patch.Upstream > > -package/python3/0021-Add-an-option-to-disable-decimal.patch > lib_patch.Upstream > > -package/python3/ > 0022-Add-an-option-to-disable-the-ossaudiodev-module.patch > lib_patch.Upstream > > -package/python3/0023-Add-an-option-to-disable-openssl-support.patch > lib_patch.Upstream > > -package/python3/0024-Add-an-option-to-disable-the-readline-module.patch > lib_patch.Upstream > > -package/python3/ > 0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > lib_patch.Upstream > > -package/python3/0026-python-config.sh-don-t-reassign-prefix.patch > lib_patch.Upstream > > -package/python3/0027-Add-an-option-to-disable-uuid-module.patch > lib_patch.Upstream > > -package/python3/0028-fix-building-on-older-distributions.patch > lib_patch.Upstream > > -package/python3/ > 0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > lib_patch.Upstream > > -package/python3/ > 0030-Add-an-option-to-disable-the-berkeleydb-module.patch > lib_patch.Upstream > > -package/python3/ > 0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > lib_patch.Upstream > > +package/python3/0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch > lib_patch.Upstream > > +package/python3/0005-Don-t-add-multiarch-paths.patch lib_patch.Upstream > > +package/python3/0006-Abort-on-failed-module-build.patch > lib_patch.Upstream > > +package/python3/0007-Serial-ioctl-workaround.patch lib_patch.Upstream > > +package/python3/0008-Add-an-option-to-disable-pydoc.patch > lib_patch.Upstream > > +package/python3/0009-Add-an-option-to-disable-lib2to3.patch > lib_patch.Upstream > > +package/python3/0010-Add-option-to-disable-the-sqlite3-module.patch > lib_patch.Upstream > > +package/python3/0011-Add-an-option-to-disable-the-tk-module.patch > lib_patch.Upstream > > +package/python3/0012-Add-an-option-to-disable-the-curses-module.patch > lib_patch.Upstream > > +package/python3/0013-Add-an-option-to-disable-expat.patch > lib_patch.Upstream > > +package/python3/0014-Add-an-option-to-disable-CJK-codecs.patch > lib_patch.Upstream > > +package/python3/0015-Add-an-option-to-disable-NIS.patch > lib_patch.Upstream > > +package/python3/0016-Add-an-option-to-disable-unicodedata.patch > lib_patch.Upstream > > +package/python3/0017-Add-an-option-to-disable-IDLE.patch > lib_patch.Upstream > > +package/python3/0018-Add-an-option-to-disable-decimal.patch > lib_patch.Upstream > > +package/python3/ > 0019-Add-an-option-to-disable-the-ossaudiodev-module.patch > lib_patch.Upstream > > +package/python3/0020-Add-an-option-to-disable-openssl-support.patch > lib_patch.Upstream > > +package/python3/0021-Add-an-option-to-disable-the-readline-module.patch > lib_patch.Upstream > > +package/python3/ > 0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > lib_patch.Upstream > > +package/python3/0023-Add-an-option-to-disable-uuid-module.patch > lib_patch.Upstream > > +package/python3/ > 0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > lib_patch.Upstream > > +package/python3/ > 0025-Add-an-option-to-disable-the-berkeleydb-module.patch > lib_patch.Upstream > > +package/python3/ > 0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > lib_patch.Upstream > > package/qemu/0001-tests-fp-disable-fp-bench-build-by-default.patch > lib_patch.Upstream > > package/qemu/ > 0002-softmmu-qemu-seccomp.c-add-missing-header-for-CLONE_.patch > lib_patch.Upstream > > package/qextserialport/ > 0001-Create-a-main-include-file-QExtSerialPort.patch lib_patch.Upstream > > diff --git a/package/python3/ > 0004-Adjust-library-header-paths-for-cross-compilation.patch b/package/ > python3/0004-Adjust-library-header-paths-for-cross-compilation.patch > > deleted file mode 100644 > > index 9a55d2582d..0000000000 > > --- a/package/python3/ > 0004-Adjust-library-header-paths-for-cross-compilation.patch > > +++ /dev/null > > @@ -1,69 +0,0 @@ > > -From 132b9dca3bb4d4682f7e318648ce11e1abb31b62 Mon Sep 17 00:00:00 2001 > > -From: Thomas Petazzoni <[8]thomas.petazzoni@free-electrons.com> > > -Date: Wed, 23 Dec 2015 11:33:14 +0100 > > -Subject: [PATCH] Adjust library/header paths for cross-compilation > > - > > -When cross-compiling third-party extensions, the get_python_inc() or > > -get_python_lib() can be called, to return the path to headers or > > -libraries. However, they use the sys.prefix of the host Python, which > > -returns incorrect paths when cross-compiling (paths pointing to host > > -headers and libraries). > > - > > -In order to fix this, we introduce the _python_sysroot, _python_prefix > > -and _python_exec_prefix variables, that allow to override these > > -values, and get correct header/library paths when cross-compiling > > -third-party Python modules. > > - > > -Signed-off-by: Thomas Petazzoni <[9]thomas.petazzoni@free-electrons.com> > > -Signed-off-by: Adam Duskett <[10]aduskett@gmail.com> > > -Refresh for 3.10.0 > > ---- > > - Lib/distutils/command/build_ext.py | 5 ++++- > > - Lib/sysconfig.py | 15 +++++++++++---- > > - 2 files changed, 15 insertions(+), 5 deletions(-) > > - > > -diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/ > build_ext.py > > -index f287b34998..298234d6a1 100644 > > ---- a/Lib/distutils/command/build_ext.py > > -+++ b/Lib/distutils/command/build_ext.py > > -@@ -234,7 +234,10 @@ def finalize_options(self): > > - if (sysconfig.get_config_var('Py_ENABLE_SHARED')): > > - if not sysconfig.python_build: > > - # building third party extensions > > -- self.library_dirs.append(sysconfig.get_config_var > ('LIBDIR')) > > -+ libdir = sysconfig.get_config_var('LIBDIR') > > -+ if "_python_sysroot" in os.environ: > > -+ libdir = os.environ.get("_python_sysroot") + libdir > > -+ self.library_dirs.append(libdir) > > - else: > > - # building python standard extensions > > - self.library_dirs.append('.') > > -diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py > > -index ebe3711827..6328ec41af 100644 > > ---- a/Lib/sysconfig.py > > -+++ b/Lib/sysconfig.py > > -@@ -168,10 +168,17 @@ def joinuser(*args): > > - _PY_VERSION = sys.version.split()[0] > > - _PY_VERSION_SHORT = f'{sys.version_info[0]}.{sys.version_info[1]}' > > - _PY_VERSION_SHORT_NO_DOT = f'{sys.version_info[0]}{sys.version_info[1]} > ' > > --_PREFIX = os.path.normpath(sys.prefix) > > --_BASE_PREFIX = os.path.normpath(sys.base_prefix) > > --_EXEC_PREFIX = os.path.normpath(sys.exec_prefix) > > --_BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) > > -+if "_python_sysroot" in os.environ: > > -+ _sysroot=os.environ.get('_python_sysroot') > > -+ _PREFIX = os.path.normpath(_sysroot + os.environ.get > ('_python_prefix')) > > -+ _EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get > ('_python_exec_prefix')) > > -+ _BASE_PREFIX = _PREFIX > > -+ _BASE_EXEC_PREFIX = _EXEC_PREFIX > > -+else: > > -+ _PREFIX = os.path.normpath(sys.prefix) > > -+ _EXEC_PREFIX = os.path.normpath(sys.exec_prefix) > > -+ _BASE_PREFIX = os.path.normpath(sys.base_prefix) > > -+ _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) > > - _CONFIG_VARS = None > > - _USER_BASE = None > > - > > --- > > -2.34.1 > > - > > diff --git a/package/python3/ > 0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch b/package/python3/ > 0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch > > similarity index 100% > > rename from package/python3/ > 0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch > > rename to package/python3/ > 0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch > > diff --git a/package/python3/0006-Don-t-add-multiarch-paths.patch b/ > package/python3/0005-Don-t-add-multiarch-paths.patch > > similarity index 100% > > rename from package/python3/0006-Don-t-add-multiarch-paths.patch > > rename to package/python3/0005-Don-t-add-multiarch-paths.patch > > diff --git a/package/python3/0007-Abort-on-failed-module-build.patch b/ > package/python3/0006-Abort-on-failed-module-build.patch > > similarity index 100% > > rename from package/python3/0007-Abort-on-failed-module-build.patch > > rename to package/python3/0006-Abort-on-failed-module-build.patch > > diff --git a/package/python3/0008-Serial-ioctl-workaround.patch b/package > /python3/0007-Serial-ioctl-workaround.patch > > similarity index 100% > > rename from package/python3/0008-Serial-ioctl-workaround.patch > > rename to package/python3/0007-Serial-ioctl-workaround.patch > > diff --git a/package/python3/0011-Add-an-option-to-disable-pydoc.patch b/ > package/python3/0008-Add-an-option-to-disable-pydoc.patch > > similarity index 100% > > rename from package/python3/0011-Add-an-option-to-disable-pydoc.patch > > rename to package/python3/0008-Add-an-option-to-disable-pydoc.patch > > diff --git a/package/python3/0012-Add-an-option-to-disable-lib2to3.patch > b/package/python3/0009-Add-an-option-to-disable-lib2to3.patch > > similarity index 100% > > rename from package/python3/0012-Add-an-option-to-disable-lib2to3.patch > > rename to package/python3/0009-Add-an-option-to-disable-lib2to3.patch > > diff --git a/package/python3/ > 0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch b/package/ > python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > > deleted file mode 100644 > > index eff8fc7694..0000000000 > > --- a/package/python3/ > 0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > > +++ /dev/null > > @@ -1,35 +0,0 @@ > > -From 2439bd2ed5dbdd7e5fda15adefd0f6f1b047ec1b Mon Sep 17 00:00:00 2001 > > -From: Christophe Vu-Brugier <[11]cvubrugier@fastmail.fm> > > -Date: Wed, 23 Dec 2015 11:44:30 +0100 > > -Subject: [PATCH] Do not adjust the shebang of Python scripts for > > - cross-compilation > > - > > -The copy_scripts() method in distutils copies the scripts listed in > > -the setup file and adjusts the first line to refer to the current > > -Python interpreter. When cross-compiling, this means that the adjusted > > -shebang refers to the host Python interpreter. > > - > > -This patch modifies copy_scripts() to preserve the shebang when > > -cross-compilation is detected. > > - > > -Signed-off-by: Christophe Vu-Brugier <[12]cvubrugier@fastmail.fm> > > ---- > > - Lib/distutils/command/build_scripts.py | 2 +- > > - 1 file changed, 1 insertion(+), 1 deletion(-) > > - > > -diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/ > command/build_scripts.py > > -index ccc70e6465..d6d54195c1 100644 > > ---- a/Lib/distutils/command/build_scripts.py > > -+++ b/Lib/distutils/command/build_scripts.py > > -@@ -91,7 +91,7 @@ def copy_scripts(self): > > - adjust = True > > - post_interp = match.group(1) or b'' > > - > > -- if adjust: > > -+ if adjust and not '_python_sysroot' in os.environ: > > - [13]log.info("copying and adjusting %s -> %s", script, > > - self.build_dir) > > - updated_files.append(outfile) > > --- > > -2.34.1 > > - > > diff --git a/package/python3/ > 0013-Add-option-to-disable-the-sqlite3-module.patch b/package/python3/ > 0010-Add-option-to-disable-the-sqlite3-module.patch > > similarity index 100% > > rename from package/python3/ > 0013-Add-option-to-disable-the-sqlite3-module.patch > > rename to package/python3/ > 0010-Add-option-to-disable-the-sqlite3-module.patch > > diff --git a/package/python3/ > 0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch b/package/ > python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > > deleted file mode 100644 > > index f26ee85b61..0000000000 > > --- a/package/python3/ > 0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > > +++ /dev/null > > @@ -1,67 +0,0 @@ > > -From 55ef5552e4ee60266e3299f253bec3b13785e585 Mon Sep 17 00:00:00 2001 > > -From: Peter Korsgaard <[14]peter@korsgaard.com> > > -Date: Thu, 20 Nov 2014 13:24:59 +0100 > > -Subject: [PATCH] Misc/[15]python-config.sh.in: ensure sed invocations > only match > > - beginning of strings > > - > > -The build/real prefix handling using sed breaks if build != real and the > > -standard include / lib directories are used ($prefix/include and $prefix > /lib). > > - > > -E.G. > > - > > -prefix_build="/usr", libdir="$prefix/lib", includedir="$prefix/include". > > - > > -If this gets installed with make DESTDIR="/foo" install, then we end up > with > > -prefix_real = prefix = "/foo/usr" as expected, but > > -includedir="/foo/foo/usr/include" and libdir="/foo/foo/usr/lib" because > of > > -the double sed invocation (prefix is already expanded). Work around it > by > > -ensuring we only match the beginning of the string. > > - > > -Submitted upstream: [16]http://bugs.python.org/issue22907 > > - > > -Signed-off-by: Peter Korsgaard <[17]peter@korsgaard.com> > > ---- > > - Misc/[18]python-config.sh.in | 13 +++++++------ > > - 1 file changed, 7 insertions(+), 6 deletions(-) > > - > > -diff --git a/Misc/[19]python-config.sh.in b/Misc/[20]python-config.sh.in > > -index 2602fe24c0..a1bc3cd5f7 100644 > > ---- a/Misc/[21]python-config.sh.in > > -+++ b/Misc/[22]python-config.sh.in > > -@@ -24,18 +24,19 @@ installed_prefix () > > - echo $RESULT > > - } > > - > > -+prefix_build="@prefix@" > > - prefix_real=$(installed_prefix "$0") > > - > > - # Use sed to fix paths from their built-to locations to their > installed-to > > - # locations. Keep prefix & exec_prefix using their original values in > case > > - # they are referenced in other configure variables, to prevent double > > - # substitution, issue #22140. > > --prefix="@prefix@" > > --exec_prefix="@exec_prefix@" > > -+prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#") > > -+exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build# > $prefix_real#") > > - exec_prefix_real=${prefix_real} > > --includedir=$(echo "@includedir@" | sed "s#$prefix#$prefix_real#") > > --libdir=$(echo "@libdir@" | sed "s#$prefix#$prefix_real#") > > --CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix#$prefix_real#") > > -+includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real# > ") > > -+libdir=$(echo "@libdir@" | sed "s#^$prefix_build#$prefix_real#") > > -+CFLAGS=$(echo "@CFLAGS@" | sed "s#^$prefix_build#$prefix_real#") > > - VERSION="@VERSION@" > > - LIBM="@LIBM@" > > - LIBC="@LIBC@" > > -@@ -49,7 +50,7 @@ OPT="@OPT@" > > - PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" > > - LDVERSION="@LDVERSION@" > > - LIBDEST=${prefix_real}/lib/python${VERSION} > > --LIBPL=$(echo "@LIBPL@" | sed "s#$prefix#$prefix_real#") > > -+LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#") > > - SO="@EXT_SUFFIX@" > > - PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" > > - INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" > > --- > > -2.34.1 > > - > > diff --git a/package/python3/ > 0014-Add-an-option-to-disable-the-tk-module.patch b/package/python3/ > 0011-Add-an-option-to-disable-the-tk-module.patch > > similarity index 100% > > rename from package/python3/ > 0014-Add-an-option-to-disable-the-tk-module.patch > > rename to package/python3/ > 0011-Add-an-option-to-disable-the-tk-module.patch > > diff --git a/package/python3/ > 0015-Add-an-option-to-disable-the-curses-module.patch b/package/python3/ > 0012-Add-an-option-to-disable-the-curses-module.patch > > similarity index 100% > > rename from package/python3/ > 0015-Add-an-option-to-disable-the-curses-module.patch > > rename to package/python3/ > 0012-Add-an-option-to-disable-the-curses-module.patch > > diff --git a/package/python3/0016-Add-an-option-to-disable-expat.patch b/ > package/python3/0013-Add-an-option-to-disable-expat.patch > > similarity index 100% > > rename from package/python3/0016-Add-an-option-to-disable-expat.patch > > rename to package/python3/0013-Add-an-option-to-disable-expat.patch > > diff --git a/package/python3/ > 0017-Add-an-option-to-disable-CJK-codecs.patch b/package/python3/ > 0014-Add-an-option-to-disable-CJK-codecs.patch > > similarity index 100% > > rename from package/python3/ > 0017-Add-an-option-to-disable-CJK-codecs.patch > > rename to package/python3/0014-Add-an-option-to-disable-CJK-codecs.patch > > diff --git a/package/python3/0018-Add-an-option-to-disable-NIS.patch b/ > package/python3/0015-Add-an-option-to-disable-NIS.patch > > similarity index 100% > > rename from package/python3/0018-Add-an-option-to-disable-NIS.patch > > rename to package/python3/0015-Add-an-option-to-disable-NIS.patch > > diff --git a/package/python3/ > 0019-Add-an-option-to-disable-unicodedata.patch b/package/python3/ > 0016-Add-an-option-to-disable-unicodedata.patch > > similarity index 100% > > rename from package/python3/ > 0019-Add-an-option-to-disable-unicodedata.patch > > rename to package/python3/0016-Add-an-option-to-disable-unicodedata.patch > > diff --git a/package/python3/0020-Add-an-option-to-disable-IDLE.patch b/ > package/python3/0017-Add-an-option-to-disable-IDLE.patch > > similarity index 100% > > rename from package/python3/0020-Add-an-option-to-disable-IDLE.patch > > rename to package/python3/0017-Add-an-option-to-disable-IDLE.patch > > diff --git a/package/python3/0021-Add-an-option-to-disable-decimal.patch > b/package/python3/0018-Add-an-option-to-disable-decimal.patch > > similarity index 100% > > rename from package/python3/0021-Add-an-option-to-disable-decimal.patch > > rename to package/python3/0018-Add-an-option-to-disable-decimal.patch > > diff --git a/package/python3/ > 0022-Add-an-option-to-disable-the-ossaudiodev-module.patch b/package/ > python3/0019-Add-an-option-to-disable-the-ossaudiodev-module.patch > > similarity index 100% > > rename from package/python3/ > 0022-Add-an-option-to-disable-the-ossaudiodev-module.patch > > rename to package/python3/ > 0019-Add-an-option-to-disable-the-ossaudiodev-module.patch > > diff --git a/package/python3/ > 0023-Add-an-option-to-disable-openssl-support.patch b/package/python3/ > 0020-Add-an-option-to-disable-openssl-support.patch > > similarity index 100% > > rename from package/python3/ > 0023-Add-an-option-to-disable-openssl-support.patch > > rename to package/python3/ > 0020-Add-an-option-to-disable-openssl-support.patch > > diff --git a/package/python3/ > 0024-Add-an-option-to-disable-the-readline-module.patch b/package/python3/ > 0021-Add-an-option-to-disable-the-readline-module.patch > > similarity index 100% > > rename from package/python3/ > 0024-Add-an-option-to-disable-the-readline-module.patch > > rename to package/python3/ > 0021-Add-an-option-to-disable-the-readline-module.patch > > diff --git a/package/python3/ > 0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch b/package/ > python3/0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > > similarity index 100% > > rename from package/python3/ > 0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > > rename to package/python3/ > 0022-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch > > diff --git a/package/python3/ > 0027-Add-an-option-to-disable-uuid-module.patch b/package/python3/ > 0023-Add-an-option-to-disable-uuid-module.patch > > similarity index 100% > > rename from package/python3/ > 0027-Add-an-option-to-disable-uuid-module.patch > > rename to package/python3/0023-Add-an-option-to-disable-uuid-module.patch > > diff --git a/package/python3/ > 0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch b/package/ > python3/0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > > similarity index 100% > > rename from package/python3/ > 0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > > rename to package/python3/ > 0024-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch > > diff --git a/package/python3/ > 0030-Add-an-option-to-disable-the-berkeleydb-module.patch b/package/python3 > /0025-Add-an-option-to-disable-the-berkeleydb-module.patch > > similarity index 100% > > rename from package/python3/ > 0030-Add-an-option-to-disable-the-berkeleydb-module.patch > > rename to package/python3/ > 0025-Add-an-option-to-disable-the-berkeleydb-module.patch > > diff --git a/package/python3/ > 0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch b/package/ > python3/0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > > similarity index 100% > > rename from package/python3/ > 0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > > rename to package/python3/ > 0026-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch > > diff --git a/package/python3/ > 0026-python-config.sh-don-t-reassign-prefix.patch b/package/python3/ > 0026-python-config.sh-don-t-reassign-prefix.patch > > deleted file mode 100644 > > index b6bfb010a0..0000000000 > > --- a/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch > > +++ /dev/null > > @@ -1,53 +0,0 @@ > > -From 755fb526a62df2a73560f42184db8aadb6899bb0 Mon Sep 17 00:00:00 2001 > > -From: Matt Weber <[23]matthew.weber@rockwellcollins.com> > > -Date: Fri, 6 Oct 2017 09:54:15 -0500 > > -Subject: [PATCH] python-config.sh: don't reassign ${prefix} > > - > > -When prefix is set to a path like /usr during crossbuild > > -the sed operations end up executing twice, once for the prefix > > -reassignment and another for includedir if it is set as a string > > -including the ${prefix} variable. This results in an issue > > -when the build directory is under /usr. > > - > > -This patch updates the remaining location which uses the prefix > > -variable to also sed and update to use the real path. > > - > > -Upstream bug report: > > -[24]https://bugs.python.org/issue31713 > > - > > -Buildroot bug: > > -[25]https://bugs.busybox.net/show_bug.cgi?id=10361 > > - > > -Fixes failures like the following: > > -dbus-python-1.2.4 | NOK | [26]http://autobuild.buildroot.net/results/ > 758858efa97b6273c1b470513f5492258a6d8853 > > - > > -Signed-off-by: Matthew Weber <[27]matthew.weber@rockwellcollins.com> > > ---- > > - Misc/[28]python-config.sh.in | 4 ++-- > > - 1 file changed, 2 insertions(+), 2 deletions(-) > > - > > -diff --git a/Misc/[29]python-config.sh.in b/Misc/[30]python-config.sh.in > > -index a1bc3cd5f7..164d2d3603 100644 > > ---- a/Misc/[31]python-config.sh.in > > -+++ b/Misc/[32]python-config.sh.in > > -@@ -31,7 +31,7 @@ prefix_real=$(installed_prefix "$0") > > - # locations. Keep prefix & exec_prefix using their original values in > case > > - # they are referenced in other configure variables, to prevent double > > - # substitution, issue #22140. > > --prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#") > > -+prefix=$prefix_build > > - exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build# > $prefix_real#") > > - exec_prefix_real=${prefix_real} > > - includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real# > ") > > -@@ -49,7 +49,7 @@ LDLIBRARY="@LDLIBRARY@" > > - OPT="@OPT@" > > - PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" > > - LDVERSION="@LDVERSION@" > > --LIBDEST=${prefix_real}/lib/python${VERSION} > > -+LIBDEST=$( echo "${prefix}/lib/python${VERSION}" | sed "s#^ > $prefix_build#$prefix_real#") > > - LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#") > > - SO="@EXT_SUFFIX@" > > - PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" > > --- > > -2.34.1 > > - > > diff --git a/package/python3/ > 0032-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch b/package/ > python3/0027-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch > > similarity index 100% > > rename from package/python3/ > 0032-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch > > rename to package/python3/ > 0027-gh-115382-Fix-cross-compiles-when-host-and-target-us.patch > > diff --git a/package/python3/ > 0028-fix-building-on-older-distributions.patch b/package/python3/ > 0028-fix-building-on-older-distributions.patch > > deleted file mode 100644 > > index 4541b31c5f..0000000000 > > --- a/package/python3/0028-fix-building-on-older-distributions.patch > > +++ /dev/null > > @@ -1,47 +0,0 @@ > > -From e52e2c5e3df4bc3d2ff07ecb3b8e2a9099ea1631 Mon Sep 17 00:00:00 2001 > > -From: Adam Duskett <[33]aduskett@gmail.com> > > -Date: Thu, 16 Aug 2018 14:52:37 -0700 > > -Subject: [PATCH] fix building on older distributions > > - > > -Python > 3.6.3 calls os.replace in the update_file.py script, during the > > -regen-importlib phase of the build process. > > - > > -According to Doc/whatsnew/3.3.rst line 1631, os.replace acts in the same > > -way as os.rename, however, it is now cross-platform compatible for > Windows. > > - > > -Because BuildRoot is guaranteed only to be built in POSIX environment, > it is > > -safe to change os.replace back to os.rename. > > - > > -This change fixes building on older systems such as CentOS7, that only > come > > -with python 2. > > - > > -Signed-off-by: Adam Duskett <[34]aduskett@gmail.com> > > ---- > > - Tools/scripts/update_file.py | 4 ++-- > > - 1 file changed, 2 insertions(+), 2 deletions(-) > > - > > -diff --git a/Tools/scripts/update_file.py b/Tools/scripts/update_file.py > > -index b4182c1d0c..ab443cb1a6 100644 > > ---- a/Tools/scripts/update_file.py > > -+++ b/Tools/scripts/update_file.py > > -@@ -53,7 +53,7 @@ def update_file_with_tmpfile(filename, tmpfile, *, > create=False): > > - if not create: > > - raise # re-raise > > - outcome = 'created' > > -- os.replace(tmpfile, filename) > > -+ os.rename(tmpfile, filename) > > - else: > > - with targetfile: > > - old_contents = targetfile.read() > > -@@ -62,7 +62,7 @@ def update_file_with_tmpfile(filename, tmpfile, *, > create=False): > > - # Now compare! > > - if old_contents != new_contents: > > - outcome = 'updated' > > -- os.replace(tmpfile, filename) > > -+ os.rename(tmpfile, filename) > > - else: > > - outcome = 'same' > > - os.unlink(tmpfile) > > --- > > -2.34.1 > > - > > -- > > 2.34.1 > > > > _______________________________________________ > > buildroot mailing list > > [35]buildroot@buildroot.org > > [36]https://lists.buildroot.org/mailman/listinfo/buildroot > > -- > .-----------------.--------------------.------------------.--------------------. > | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' > conspiracy: | > | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ > | > | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is > no | > | [37]http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v > conspiracy. | > '------------------------------^-------^------------------^ > --------------------' > > > References: > > [1] mailto:yann.morin.1998@free.fr > [2] http://pkg-python.mk:45/ > [3] https://github.com/python/cpython/issues/67096 > [4] https://github.com/python/cpython/issues/75894 > [5] https://github.com/python/cpython/issues/66338 > [6] https://github.com/python/cpython/commit/14086cfc5eed8c5e78342d79e5db87a135d75fa8 > [7] mailto:vfazio@gmail.com > [8] mailto:thomas.petazzoni@free-electrons.com > [9] mailto:thomas.petazzoni@free-electrons.com > [10] mailto:aduskett@gmail.com > [11] mailto:cvubrugier@fastmail.fm > [12] mailto:cvubrugier@fastmail.fm > [13] http://log.info/ > [14] mailto:peter@korsgaard.com > [15] http://python-config.sh.in/ > [16] http://bugs.python.org/issue22907 > [17] mailto:peter@korsgaard.com > [18] http://python-config.sh.in/ > [19] http://python-config.sh.in/ > [20] http://python-config.sh.in/ > [21] http://python-config.sh.in/ > [22] http://python-config.sh.in/ > [23] mailto:matthew.weber@rockwellcollins.com > [24] https://bugs.python.org/issue31713 > [25] https://bugs.busybox.net/show_bug.cgi?id=10361 > [26] http://autobuild.buildroot.net/results/758858efa97b6273c1b470513f5492258a6d8853 > [27] mailto:matthew.weber@rockwellcollins.com > [28] http://python-config.sh.in/ > [29] http://python-config.sh.in/ > [30] http://python-config.sh.in/ > [31] http://python-config.sh.in/ > [32] http://python-config.sh.in/ > [33] mailto:aduskett@gmail.com > [34] mailto:aduskett@gmail.com > [35] mailto:buildroot@buildroot.org > [36] https://lists.buildroot.org/mailman/listinfo/buildroot > [37] http://ymorin.is-a-geek.org/ -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] packge/pkg-python: drop custom environment variables 2024-04-28 2:42 [Buildroot] [PATCH 1/1] package/python3: drop unnecessary patches Vincent Fazio 2024-04-29 8:56 ` Yann E. MORIN @ 2024-05-07 16:29 ` Vincent Fazio 2024-05-07 16:29 ` [Buildroot] [PATCH v2 2/2] package/python3: drop unnecessary patches Vincent Fazio 2024-05-09 14:01 ` [Buildroot] [PATCH 1/2] packge/pkg-python: drop custom environment variables Thomas Petazzoni via buildroot 1 sibling, 2 replies; 8+ messages in thread From: Vincent Fazio @ 2024-05-07 16:29 UTC (permalink / raw) To: buildroot Cc: Asaf Kahlon, James Hilliard, Thomas Petazzoni, Yann E . MORIN, Vincent Fazio Many moons ago, in the dark ages of Python, cross compiles were largely unsupported. In these before-times, a patchset used by PtxDist [0] [1] was adapted to help make cross compiles work. The patchset did a number of things but mainly: 1) used a build-machine compatible python interpreter for certain stages of the target Python build process 2) made adjustments to certain files to make decisions based on values set in environment variables instead of the path of the executing Python interpreter. Since the path of the interpreter that was build machine compatible was outside of the target build directory, the code that made assumptions about the location of headers and library paths being relative to the interpreter path needed to be adjusted, hence them being driven via environment variables. The patchset worked by replacing the executable path to be the sysroot which included the python headers and libraries. A number of issues regarding cross compilation [2] [3] [4] have since been closed since the introduction of this patchset and cross builds became much better supported starting in Python v3.3.1. New logic primarily uses the _PYTHON_PROJECT_BASE env variable [5] [6]. When set properly, this drives a few things: * flags a cross compile environment * sysconfig.is_python_build = True which triggers: * altered paths for finding the Makefile and config.h * altered sysconfig.get_config_var("srcdir") When migrating to Python 3.4, PtxDist reworked their patchset to use the standard environment variables for their cross compiles [7]. The distutils module was a primary consumer of the custom variables from the previous patchset, however, that module is deprecated and packages cannot target it as of 09de823c. Package builds and unit tests seem to work without using these variables being set, implying they can likely be dropped. Packages that still use distutils should be updated to reflect its removal in 3.12. Once these custom variables are removed, the following Python3 patches which leverage them can be dropped: 0004-Adjust-library-header-paths-for-cross-compilation 0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros [0]: https://gitlab.vahanus.net/ptxdist/ptxdist/-/commit/eef994411c20653cde95b35266000e3a8754e3b3 [1]: https://gitlab.vahanus.net/ptxdist/ptxdist/-/commit/6c79cb5ac373b1cccf531e8be3ed1b9722ed1622 [2]: https://github.com/python/cpython/issues/48004 [3]: https://github.com/python/cpython/issues/58538 [4]: https://github.com/python/cpython/issues/59689 [5]: https://github.com/python/cpython/commit/7e6c2e2cc49fa109662d3f04f4c3553596d31937 [6]: https://github.com/python/cpython/commit/9731330d6f4d63d6d57c8e99c8d11ef1def42858 [7]: https://gitlab.vahanus.net/ptxdist/ptxdist/-/commit/638a024500c214c1d8283bce8cec864fb95deacf Signed-off-by: Vincent Fazio <vfazio@gmail.com> --- package/pkg-python.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/package/pkg-python.mk b/package/pkg-python.mk index 839f728e2f..88fadecd54 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -41,10 +41,7 @@ PKG_PYTHON_ENV = \ PATH=$(BR_PATH) \ $(TARGET_CONFIGURE_OPTS) \ PYTHONPATH="$(PYTHON3_PATH)" \ - PYTHONNOUSERSITE=1 \ - _python_sysroot=$(STAGING_DIR) \ - _python_prefix=/usr \ - _python_exec_prefix=/usr + PYTHONNOUSERSITE=1 # Host python packages HOST_PKG_PYTHON_ENV = \ -- 2.34.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2 2/2] package/python3: drop unnecessary patches 2024-05-07 16:29 ` [Buildroot] [PATCH 1/2] packge/pkg-python: drop custom environment variables Vincent Fazio @ 2024-05-07 16:29 ` Vincent Fazio 2024-05-09 14:02 ` Thomas Petazzoni via buildroot 2024-05-09 14:01 ` [Buildroot] [PATCH 1/2] packge/pkg-python: drop custom environment variables Thomas Petazzoni via buildroot 1 sibling, 1 reply; 8+ messages in thread From: Vincent Fazio @ 2024-05-07 16:29 UTC (permalink / raw) To: buildroot Cc: Asaf Kahlon, James Hilliard, Thomas Petazzoni, Yann E . MORIN, Vincent Fazio Patches 0004 and 0009 relied upon environment variables that were used to drive custom logic in distutils when executed by an external Python interpreter. This issue should have been mostly addressed upstream [0], but even if that was not the case, distutils is no longer a supported installation method for packages to use for installation as of 09de823c. As such, there shouldn't be a need to continue to patch it as setuptools vendors its own distutils that supercedes the one provided by Python. Patches 0010 and 0026 (see [1] [2] [3]) can be removed due to a fix introduced in 3.7 [4]. Patch 0028 can be dropped since commit 3fed4245 removed the dependency on a host provided python to build host-python3. [0] https://github.com/python/cpython/commit/9731330d6f4d63d6d57c8e99c8d11ef1def42858 [1]: https://github.com/python/cpython/issues/67096 [2]: https://github.com/python/cpython/issues/75894 [3]: https://github.com/python/cpython/issues/66338 [4]: https://github.com/python/cpython/commit/14086cfc5eed8c5e78342d79e5db87a135d75fa8 Signed-off-by: Vincent Fazio <vfazio@gmail.com> --- Changes v1 -> v2: - reworded rationale for 0004 and 0009 --- .checkpackageignore | 5 -- ...y-header-paths-for-cross-compilation.patch | 69 ------------------- ...e-shebang-of-Python-scripts-for-cros.patch | 35 ---------- ...ig.sh.in-ensure-sed-invocations-only.patch | 67 ------------------ ...thon-config.sh-don-t-reassign-prefix.patch | 53 -------------- ...-fix-building-on-older-distributions.patch | 47 ------------- 6 files changed, 276 deletions(-) delete mode 100644 package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch delete mode 100644 package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch delete mode 100644 package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch delete mode 100644 package/python3/0026-python-config.sh-don-t-reassign-prefix.patch delete mode 100644 package/python3/0028-fix-building-on-older-distributions.patch diff --git a/.checkpackageignore b/.checkpackageignore index 3be4f6a1df..071a72b837 100644 --- a/.checkpackageignore +++ b/.checkpackageignore @@ -1323,13 +1323,10 @@ package/python-ws4py/0001-Adjust-ws4py-for-Python-3.7-syntax.patch lib_patch.Ups package/python3/0001-Make-the-build-of-pyc-files-conditional.patch lib_patch.Upstream package/python3/0002-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch lib_patch.Upstream package/python3/0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch lib_patch.Upstream -package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch lib_patch.Upstream package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch lib_patch.Upstream package/python3/0006-Don-t-add-multiarch-paths.patch lib_patch.Upstream package/python3/0007-Abort-on-failed-module-build.patch lib_patch.Upstream package/python3/0008-Serial-ioctl-workaround.patch lib_patch.Upstream -package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch lib_patch.Upstream -package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch lib_patch.Upstream package/python3/0011-Add-an-option-to-disable-pydoc.patch lib_patch.Upstream package/python3/0012-Add-an-option-to-disable-lib2to3.patch lib_patch.Upstream package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch lib_patch.Upstream @@ -1345,9 +1342,7 @@ package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch lib_p package/python3/0023-Add-an-option-to-disable-openssl-support.patch lib_patch.Upstream package/python3/0024-Add-an-option-to-disable-the-readline-module.patch lib_patch.Upstream package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch lib_patch.Upstream -package/python3/0026-python-config.sh-don-t-reassign-prefix.patch lib_patch.Upstream package/python3/0027-Add-an-option-to-disable-uuid-module.patch lib_patch.Upstream -package/python3/0028-fix-building-on-older-distributions.patch lib_patch.Upstream package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch lib_patch.Upstream package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch lib_patch.Upstream package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch lib_patch.Upstream diff --git a/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch b/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch deleted file mode 100644 index 9a55d2582d..0000000000 --- a/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 132b9dca3bb4d4682f7e318648ce11e1abb31b62 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> -Date: Wed, 23 Dec 2015 11:33:14 +0100 -Subject: [PATCH] Adjust library/header paths for cross-compilation - -When cross-compiling third-party extensions, the get_python_inc() or -get_python_lib() can be called, to return the path to headers or -libraries. However, they use the sys.prefix of the host Python, which -returns incorrect paths when cross-compiling (paths pointing to host -headers and libraries). - -In order to fix this, we introduce the _python_sysroot, _python_prefix -and _python_exec_prefix variables, that allow to override these -values, and get correct header/library paths when cross-compiling -third-party Python modules. - -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> -Signed-off-by: Adam Duskett <aduskett@gmail.com> -Refresh for 3.10.0 ---- - Lib/distutils/command/build_ext.py | 5 ++++- - Lib/sysconfig.py | 15 +++++++++++---- - 2 files changed, 15 insertions(+), 5 deletions(-) - -diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py -index f287b34998..298234d6a1 100644 ---- a/Lib/distutils/command/build_ext.py -+++ b/Lib/distutils/command/build_ext.py -@@ -234,7 +234,10 @@ def finalize_options(self): - if (sysconfig.get_config_var('Py_ENABLE_SHARED')): - if not sysconfig.python_build: - # building third party extensions -- self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) -+ libdir = sysconfig.get_config_var('LIBDIR') -+ if "_python_sysroot" in os.environ: -+ libdir = os.environ.get("_python_sysroot") + libdir -+ self.library_dirs.append(libdir) - else: - # building python standard extensions - self.library_dirs.append('.') -diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py -index ebe3711827..6328ec41af 100644 ---- a/Lib/sysconfig.py -+++ b/Lib/sysconfig.py -@@ -168,10 +168,17 @@ def joinuser(*args): - _PY_VERSION = sys.version.split()[0] - _PY_VERSION_SHORT = f'{sys.version_info[0]}.{sys.version_info[1]}' - _PY_VERSION_SHORT_NO_DOT = f'{sys.version_info[0]}{sys.version_info[1]}' --_PREFIX = os.path.normpath(sys.prefix) --_BASE_PREFIX = os.path.normpath(sys.base_prefix) --_EXEC_PREFIX = os.path.normpath(sys.exec_prefix) --_BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) -+if "_python_sysroot" in os.environ: -+ _sysroot=os.environ.get('_python_sysroot') -+ _PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) -+ _EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) -+ _BASE_PREFIX = _PREFIX -+ _BASE_EXEC_PREFIX = _EXEC_PREFIX -+else: -+ _PREFIX = os.path.normpath(sys.prefix) -+ _EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -+ _BASE_PREFIX = os.path.normpath(sys.base_prefix) -+ _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) - _CONFIG_VARS = None - _USER_BASE = None - --- -2.34.1 - diff --git a/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch b/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch deleted file mode 100644 index eff8fc7694..0000000000 --- a/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 2439bd2ed5dbdd7e5fda15adefd0f6f1b047ec1b Mon Sep 17 00:00:00 2001 -From: Christophe Vu-Brugier <cvubrugier@fastmail.fm> -Date: Wed, 23 Dec 2015 11:44:30 +0100 -Subject: [PATCH] Do not adjust the shebang of Python scripts for - cross-compilation - -The copy_scripts() method in distutils copies the scripts listed in -the setup file and adjusts the first line to refer to the current -Python interpreter. When cross-compiling, this means that the adjusted -shebang refers to the host Python interpreter. - -This patch modifies copy_scripts() to preserve the shebang when -cross-compilation is detected. - -Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm> ---- - Lib/distutils/command/build_scripts.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py -index ccc70e6465..d6d54195c1 100644 ---- a/Lib/distutils/command/build_scripts.py -+++ b/Lib/distutils/command/build_scripts.py -@@ -91,7 +91,7 @@ def copy_scripts(self): - adjust = True - post_interp = match.group(1) or b'' - -- if adjust: -+ if adjust and not '_python_sysroot' in os.environ: - log.info("copying and adjusting %s -> %s", script, - self.build_dir) - updated_files.append(outfile) --- -2.34.1 - diff --git a/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch b/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch deleted file mode 100644 index f26ee85b61..0000000000 --- a/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 55ef5552e4ee60266e3299f253bec3b13785e585 Mon Sep 17 00:00:00 2001 -From: Peter Korsgaard <peter@korsgaard.com> -Date: Thu, 20 Nov 2014 13:24:59 +0100 -Subject: [PATCH] Misc/python-config.sh.in: ensure sed invocations only match - beginning of strings - -The build/real prefix handling using sed breaks if build != real and the -standard include / lib directories are used ($prefix/include and $prefix/lib). - -E.G. - -prefix_build="/usr", libdir="$prefix/lib", includedir="$prefix/include". - -If this gets installed with make DESTDIR="/foo" install, then we end up with -prefix_real = prefix = "/foo/usr" as expected, but -includedir="/foo/foo/usr/include" and libdir="/foo/foo/usr/lib" because of -the double sed invocation (prefix is already expanded). Work around it by -ensuring we only match the beginning of the string. - -Submitted upstream: http://bugs.python.org/issue22907 - -Signed-off-by: Peter Korsgaard <peter@korsgaard.com> ---- - Misc/python-config.sh.in | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in -index 2602fe24c0..a1bc3cd5f7 100644 ---- a/Misc/python-config.sh.in -+++ b/Misc/python-config.sh.in -@@ -24,18 +24,19 @@ installed_prefix () - echo $RESULT - } - -+prefix_build="@prefix@" - prefix_real=$(installed_prefix "$0") - - # Use sed to fix paths from their built-to locations to their installed-to - # locations. Keep prefix & exec_prefix using their original values in case - # they are referenced in other configure variables, to prevent double - # substitution, issue #22140. --prefix="@prefix@" --exec_prefix="@exec_prefix@" -+prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#") -+exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build#$prefix_real#") - exec_prefix_real=${prefix_real} --includedir=$(echo "@includedir@" | sed "s#$prefix#$prefix_real#") --libdir=$(echo "@libdir@" | sed "s#$prefix#$prefix_real#") --CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix#$prefix_real#") -+includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real#") -+libdir=$(echo "@libdir@" | sed "s#^$prefix_build#$prefix_real#") -+CFLAGS=$(echo "@CFLAGS@" | sed "s#^$prefix_build#$prefix_real#") - VERSION="@VERSION@" - LIBM="@LIBM@" - LIBC="@LIBC@" -@@ -49,7 +50,7 @@ OPT="@OPT@" - PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" - LDVERSION="@LDVERSION@" - LIBDEST=${prefix_real}/lib/python${VERSION} --LIBPL=$(echo "@LIBPL@" | sed "s#$prefix#$prefix_real#") -+LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#") - SO="@EXT_SUFFIX@" - PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" - INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" --- -2.34.1 - diff --git a/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch b/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch deleted file mode 100644 index b6bfb010a0..0000000000 --- a/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 755fb526a62df2a73560f42184db8aadb6899bb0 Mon Sep 17 00:00:00 2001 -From: Matt Weber <matthew.weber@rockwellcollins.com> -Date: Fri, 6 Oct 2017 09:54:15 -0500 -Subject: [PATCH] python-config.sh: don't reassign ${prefix} - -When prefix is set to a path like /usr during crossbuild -the sed operations end up executing twice, once for the prefix -reassignment and another for includedir if it is set as a string -including the ${prefix} variable. This results in an issue -when the build directory is under /usr. - -This patch updates the remaining location which uses the prefix -variable to also sed and update to use the real path. - -Upstream bug report: -https://bugs.python.org/issue31713 - -Buildroot bug: -https://bugs.busybox.net/show_bug.cgi?id=10361 - -Fixes failures like the following: -dbus-python-1.2.4 | NOK | http://autobuild.buildroot.net/results/758858efa97b6273c1b470513f5492258a6d8853 - -Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> ---- - Misc/python-config.sh.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in -index a1bc3cd5f7..164d2d3603 100644 ---- a/Misc/python-config.sh.in -+++ b/Misc/python-config.sh.in -@@ -31,7 +31,7 @@ prefix_real=$(installed_prefix "$0") - # locations. Keep prefix & exec_prefix using their original values in case - # they are referenced in other configure variables, to prevent double - # substitution, issue #22140. --prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#") -+prefix=$prefix_build - exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build#$prefix_real#") - exec_prefix_real=${prefix_real} - includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real#") -@@ -49,7 +49,7 @@ LDLIBRARY="@LDLIBRARY@" - OPT="@OPT@" - PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" - LDVERSION="@LDVERSION@" --LIBDEST=${prefix_real}/lib/python${VERSION} -+LIBDEST=$( echo "${prefix}/lib/python${VERSION}" | sed "s#^$prefix_build#$prefix_real#") - LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#") - SO="@EXT_SUFFIX@" - PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" --- -2.34.1 - diff --git a/package/python3/0028-fix-building-on-older-distributions.patch b/package/python3/0028-fix-building-on-older-distributions.patch deleted file mode 100644 index 4541b31c5f..0000000000 --- a/package/python3/0028-fix-building-on-older-distributions.patch +++ /dev/null @@ -1,47 +0,0 @@ -From e52e2c5e3df4bc3d2ff07ecb3b8e2a9099ea1631 Mon Sep 17 00:00:00 2001 -From: Adam Duskett <aduskett@gmail.com> -Date: Thu, 16 Aug 2018 14:52:37 -0700 -Subject: [PATCH] fix building on older distributions - -Python > 3.6.3 calls os.replace in the update_file.py script, during the -regen-importlib phase of the build process. - -According to Doc/whatsnew/3.3.rst line 1631, os.replace acts in the same -way as os.rename, however, it is now cross-platform compatible for Windows. - -Because BuildRoot is guaranteed only to be built in POSIX environment, it is -safe to change os.replace back to os.rename. - -This change fixes building on older systems such as CentOS7, that only come -with python 2. - -Signed-off-by: Adam Duskett <aduskett@gmail.com> ---- - Tools/scripts/update_file.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Tools/scripts/update_file.py b/Tools/scripts/update_file.py -index b4182c1d0c..ab443cb1a6 100644 ---- a/Tools/scripts/update_file.py -+++ b/Tools/scripts/update_file.py -@@ -53,7 +53,7 @@ def update_file_with_tmpfile(filename, tmpfile, *, create=False): - if not create: - raise # re-raise - outcome = 'created' -- os.replace(tmpfile, filename) -+ os.rename(tmpfile, filename) - else: - with targetfile: - old_contents = targetfile.read() -@@ -62,7 +62,7 @@ def update_file_with_tmpfile(filename, tmpfile, *, create=False): - # Now compare! - if old_contents != new_contents: - outcome = 'updated' -- os.replace(tmpfile, filename) -+ os.rename(tmpfile, filename) - else: - outcome = 'same' - os.unlink(tmpfile) --- -2.34.1 - -- 2.34.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/python3: drop unnecessary patches 2024-05-07 16:29 ` [Buildroot] [PATCH v2 2/2] package/python3: drop unnecessary patches Vincent Fazio @ 2024-05-09 14:02 ` Thomas Petazzoni via buildroot 0 siblings, 0 replies; 8+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-05-09 14:02 UTC (permalink / raw) To: Vincent Fazio; +Cc: James Hilliard, Yann E . MORIN, Asaf Kahlon, buildroot On Tue, 7 May 2024 11:29:36 -0500 Vincent Fazio <vfazio@gmail.com> wrote: > Patches 0004 and 0009 relied upon environment variables that were used > to drive custom logic in distutils when executed by an external Python > interpreter. This issue should have been mostly addressed upstream [0], > but even if that was not the case, distutils is no longer a supported > installation method for packages to use for installation as of 09de823c. > As such, there shouldn't be a need to continue to patch it as setuptools > vendors its own distutils that supercedes the one provided by Python. > > Patches 0010 and 0026 (see [1] [2] [3]) can be removed due to a fix > introduced in 3.7 [4]. > > Patch 0028 can be dropped since commit 3fed4245 removed the dependency > on a host provided python to build host-python3. > > [0] https://github.com/python/cpython/commit/9731330d6f4d63d6d57c8e99c8d11ef1def42858 > [1]: https://github.com/python/cpython/issues/67096 > [2]: https://github.com/python/cpython/issues/75894 > [3]: https://github.com/python/cpython/issues/66338 > [4]: https://github.com/python/cpython/commit/14086cfc5eed8c5e78342d79e5db87a135d75fa8 > > Signed-off-by: Vincent Fazio <vfazio@gmail.com> > --- > Changes v1 -> v2: > - reworded rationale for 0004 and 0009 > --- > .checkpackageignore | 5 -- > ...y-header-paths-for-cross-compilation.patch | 69 ------------------- > ...e-shebang-of-Python-scripts-for-cros.patch | 35 ---------- > ...ig.sh.in-ensure-sed-invocations-only.patch | 67 ------------------ > ...thon-config.sh-don-t-reassign-prefix.patch | 53 -------------- > ...-fix-building-on-older-distributions.patch | 47 ------------- > 6 files changed, 276 deletions(-) > delete mode 100644 package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch > delete mode 100644 package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch > delete mode 100644 package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch > delete mode 100644 package/python3/0026-python-config.sh-don-t-reassign-prefix.patch > delete mode 100644 package/python3/0028-fix-building-on-older-distributions.patch Applied to master, thanks. I have also applied a follow-up patch that renumbers the remaining patches and refreshes them so they apply cleanly with "git am". Thanks for all this work on the python3 integration, this is really great! Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/2] packge/pkg-python: drop custom environment variables 2024-05-07 16:29 ` [Buildroot] [PATCH 1/2] packge/pkg-python: drop custom environment variables Vincent Fazio 2024-05-07 16:29 ` [Buildroot] [PATCH v2 2/2] package/python3: drop unnecessary patches Vincent Fazio @ 2024-05-09 14:01 ` Thomas Petazzoni via buildroot 1 sibling, 0 replies; 8+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-05-09 14:01 UTC (permalink / raw) To: Vincent Fazio; +Cc: James Hilliard, Yann E . MORIN, Asaf Kahlon, buildroot On Tue, 7 May 2024 11:29:35 -0500 Vincent Fazio <vfazio@gmail.com> wrote: > Many moons ago, in the dark ages of Python, cross compiles were largely > unsupported. In these before-times, a patchset used by PtxDist [0] [1] > was adapted to help make cross compiles work. > > The patchset did a number of things but mainly: > 1) used a build-machine compatible python interpreter for certain > stages of the target Python build process > 2) made adjustments to certain files to make decisions based on values > set in environment variables instead of the path of the executing > Python interpreter. > > Since the path of the interpreter that was build machine compatible was > outside of the target build directory, the code that made assumptions > about the location of headers and library paths being relative to the > interpreter path needed to be adjusted, hence them being driven via > environment variables. > > The patchset worked by replacing the executable path to be the sysroot > which included the python headers and libraries. > > A number of issues regarding cross compilation [2] [3] [4] have since > been closed since the introduction of this patchset and cross builds > became much better supported starting in Python v3.3.1. > > New logic primarily uses the _PYTHON_PROJECT_BASE env variable [5] [6]. > > When set properly, this drives a few things: > * flags a cross compile environment > * sysconfig.is_python_build = True which triggers: > * altered paths for finding the Makefile and config.h > * altered sysconfig.get_config_var("srcdir") > > When migrating to Python 3.4, PtxDist reworked their patchset to use > the standard environment variables for their cross compiles [7]. > > The distutils module was a primary consumer of the custom variables from > the previous patchset, however, that module is deprecated and packages > cannot target it as of 09de823c. > > Package builds and unit tests seem to work without using these variables > being set, implying they can likely be dropped. Packages that still use > distutils should be updated to reflect its removal in 3.12. > > Once these custom variables are removed, the following Python3 patches > which leverage them can be dropped: > 0004-Adjust-library-header-paths-for-cross-compilation > 0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros > > [0]: https://gitlab.vahanus.net/ptxdist/ptxdist/-/commit/eef994411c20653cde95b35266000e3a8754e3b3 > [1]: https://gitlab.vahanus.net/ptxdist/ptxdist/-/commit/6c79cb5ac373b1cccf531e8be3ed1b9722ed1622 > [2]: https://github.com/python/cpython/issues/48004 > [3]: https://github.com/python/cpython/issues/58538 > [4]: https://github.com/python/cpython/issues/59689 > [5]: https://github.com/python/cpython/commit/7e6c2e2cc49fa109662d3f04f4c3553596d31937 > [6]: https://github.com/python/cpython/commit/9731330d6f4d63d6d57c8e99c8d11ef1def42858 > [7]: https://gitlab.vahanus.net/ptxdist/ptxdist/-/commit/638a024500c214c1d8283bce8cec864fb95deacf > > Signed-off-by: Vincent Fazio <vfazio@gmail.com> > --- > package/pkg-python.mk | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) Applied to master, thanks. Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-05-09 14:02 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-04-28 2:42 [Buildroot] [PATCH 1/1] package/python3: drop unnecessary patches Vincent Fazio 2024-04-29 8:56 ` Yann E. MORIN 2024-04-29 14:48 ` Vincent Fazio 2024-04-29 17:57 ` Yann E. MORIN 2024-05-07 16:29 ` [Buildroot] [PATCH 1/2] packge/pkg-python: drop custom environment variables Vincent Fazio 2024-05-07 16:29 ` [Buildroot] [PATCH v2 2/2] package/python3: drop unnecessary patches Vincent Fazio 2024-05-09 14:02 ` Thomas Petazzoni via buildroot 2024-05-09 14:01 ` [Buildroot] [PATCH 1/2] packge/pkg-python: drop custom environment variables Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox