From 2aa2b6b98756b1256451187faa4d6999367dda46 Mon Sep 17 00:00:00 2001 From: Wang Mingyu Date: Wed, 28 Feb 2024 15:32:49 +0800 Subject: python3: upgrade 3.12.1 -> 3.12.2 0001-Avoid-shebang-overflow-on-python-config.py.patch 0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch 0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch 0001-gh-114492-Initialize-struct-termios-before-calling-t.patch 0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch 0001-skip-no_stdout_fileno-test-due-to-load-variability.patch 0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch 0020-configure.ac-setup.py-do-not-add-a-c refreshed for 3.12.2 Changelog: https://docs.python.org/3.12/whatsnew/3.12.html (From OE-Core rev: 288bdc342035f18451509b6c27e3b88b546dc984) Signed-off-by: Wang Mingyu Signed-off-by: Richard Purdie --- ...void-shebang-overflow-on-python-config.py.patch | 7 +- ...e-use-qemu-wrapper-when-gathering-profile.patch | 7 +- ...ng-tests-due-to-load-variability-on-YP-AB.patch | 7 +- ...nitialize-struct-termios-before-calling-t.patch | 24 +- ...-cc_basename-to-replace-CC-for-checking-c.patch | 7 +- ...tdout_fileno-test-due-to-load-variability.patch | 7 +- ...ree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch | 14 +- ...c-setup.py-do-not-add-a-curses-include-pa.patch | 7 +- .../recipes-devtools/python/python3/makerace.patch | 7 +- meta/recipes-devtools/python/python3_3.12.1.bb | 472 --------------------- meta/recipes-devtools/python/python3_3.12.2.bb | 472 +++++++++++++++++++++ 11 files changed, 503 insertions(+), 528 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3_3.12.1.bb create mode 100644 meta/recipes-devtools/python/python3_3.12.2.bb diff --git a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch index 03ecda98c2..0d807db39f 100644 --- a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch +++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch @@ -1,4 +1,4 @@ -From 33bf96f31c4873032ace2cc9afacc3785997527a Mon Sep 17 00:00:00 2001 +From 365399f17d35719d828ddd49182dcb401fb7791c Mon Sep 17 00:00:00 2001 From: Paulo Neves Date: Tue, 7 Jun 2022 16:16:41 +0200 Subject: [PATCH] Avoid shebang overflow on python-config.py @@ -11,16 +11,15 @@ Denial reason: [1] Upstream-Status: Denied [distribution] [1] https://github.com/python/cpython/pull/93760#pullrequestreview-1005365737 - --- Makefile.pre.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.pre.in b/Makefile.pre.in -index fb0b525..75d2e73 100644 +index 77bf09a..6353c57 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2335,6 +2335,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh +@@ -2339,6 +2339,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh @ # Substitution happens here, as the completely-expanded BINDIR @ # is not available in configure sed -e "s,@EXENAME@,$(EXENAME)," < $(srcdir)/Misc/python-config.in >python-config.py diff --git a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch index 158cbf8ee0..ee33128fa1 100644 --- a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch +++ b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch @@ -1,20 +1,19 @@ -From ea8e486a416b90c562f3b33faa91d9d1d030be0e Mon Sep 17 00:00:00 2001 +From 38278339832a57dbf5fa3ef21accaa03e2c814d7 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 30 Jan 2019 12:41:04 +0100 Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin - --- Makefile.pre.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 7af1845..fc7ab79 100644 +index dd5e69f..381feb0 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -656,8 +656,7 @@ profile-run-stamp: +@@ -658,8 +658,7 @@ profile-run-stamp: # enabled. $(MAKE) profile-gen-stamp # Next, run the profile task to generate the profile information. diff --git a/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch b/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch index edb85395ff..197daa71a5 100644 --- a/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch +++ b/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch @@ -1,4 +1,4 @@ -From bafdd769330c9d49a066fb1427f451b8d253262d Mon Sep 17 00:00:00 2001 +From 3471e3478e0760c42e04f8046cee2367ab5706d2 Mon Sep 17 00:00:00 2001 From: Yi Fan Yu Date: Thu, 1 Apr 2021 13:08:37 -0700 Subject: [PATCH] Skip failing tests due to load variability on YP AB @@ -17,14 +17,13 @@ Skip two additional tests due to suspected load variability failures. [YOCTO #15177] Signed-off-by: Trevor Gamblin - --- Lib/test/_test_multiprocessing.py | 3 +++ Lib/test/test_time.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py -index d52b10c..5f0e4e3 100644 +index e42c7ab..dff5227 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -682,6 +682,7 @@ class _TestProcess(BaseTestCase): @@ -43,7 +42,7 @@ index d52b10c..5f0e4e3 100644 def test_timeout(self): """ Test wait(timeout) -@@ -4992,6 +4994,7 @@ class TestWait(unittest.TestCase): +@@ -5024,6 +5026,7 @@ class TestWait(unittest.TestCase): time.sleep(period) @support.requires_resource('walltime') diff --git a/meta/recipes-devtools/python/python3/0001-gh-114492-Initialize-struct-termios-before-calling-t.patch b/meta/recipes-devtools/python/python3/0001-gh-114492-Initialize-struct-termios-before-calling-t.patch index 141b708a67..8406ef30a2 100644 --- a/meta/recipes-devtools/python/python3/0001-gh-114492-Initialize-struct-termios-before-calling-t.patch +++ b/meta/recipes-devtools/python/python3/0001-gh-114492-Initialize-struct-termios-before-calling-t.patch @@ -1,8 +1,9 @@ -From bd0e1bf1504a5cba12133548bc49f1fcaf7b4da2 Mon Sep 17 00:00:00 2001 +From 439aa02f42d6e6715c172076261757fcb89a936a Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 23 Jan 2024 23:02:02 +0100 -Subject: [PATCH] gh-114492: Initialize struct termios before calling tcgetattr() (GH-114495) (GH-114502) +Subject: [PATCH] gh-114492: Initialize struct termios before calling + tcgetattr() (GH-114495) (GH-114502) On Alpine Linux it could leave some field non-initialized. (cherry picked from commit d22c066b802592932f9eb18434782299e80ca42e) @@ -12,8 +13,7 @@ Co-authored-by: Serhiy Storchaka Signed-off-by: Khem Raj --- .../next/Library/2024-01-23-21-20-40.gh-issue-114492.vKxl5o.rst | 2 ++ - Modules/termios.c | 2 ++ - 2 files changed, 4 insertions(+) + 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2024-01-23-21-20-40.gh-issue-114492.vKxl5o.rst diff --git a/Misc/NEWS.d/next/Library/2024-01-23-21-20-40.gh-issue-114492.vKxl5o.rst b/Misc/NEWS.d/next/Library/2024-01-23-21-20-40.gh-issue-114492.vKxl5o.rst @@ -24,19 +24,3 @@ index 0000000..8df8299 @@ -0,0 +1,2 @@ +Make the result of :func:`termios.tcgetattr` reproducible on Alpine Linux. +Previously it could leave a random garbage in some fields. -diff --git a/Modules/termios.c b/Modules/termios.c -index c3d96cc..402e6ac 100644 ---- a/Modules/termios.c -+++ b/Modules/termios.c -@@ -84,6 +84,8 @@ termios_tcgetattr_impl(PyObject *module, int fd) - struct termios mode; - int r; - -+ /* Alpine Linux can leave some fields uninitialized. */ -+ memset(&mode, 0, sizeof(mode)); - Py_BEGIN_ALLOW_THREADS - r = tcgetattr(fd, &mode); - Py_END_ALLOW_THREADS --- -2.43.0 - diff --git a/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch b/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch index d668858066..bbeabe4389 100644 --- a/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch +++ b/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch @@ -1,4 +1,4 @@ -From 0558745601cc72c8d6d79cd691f4b82330b29d58 Mon Sep 17 00:00:00 2001 +From ababc7b1db8c406910766e11cdd04cbef7a706c9 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Mon, 22 Oct 2018 15:19:51 +0800 Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler @@ -21,13 +21,12 @@ Signed-off-by: Li Zhou patch originally from Li Zhou, I just rework it to new version Signed-off-by: Changqing Li - --- configure.ac | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac -index bd2be94..cb9e198 100644 +index 384718d..5a1d58b 100644 --- a/configure.ac +++ b/configure.ac @@ -137,6 +137,7 @@ AC_CONFIG_HEADERS([pyconfig.h]) @@ -110,7 +109,7 @@ index bd2be94..cb9e198 100644 *gcc*) if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null then -@@ -6802,7 +6803,7 @@ if test "$ac_cv_gcc_asm_for_x87" = yes; then +@@ -6803,7 +6804,7 @@ if test "$ac_cv_gcc_asm_for_x87" = yes; then # Some versions of gcc miscompile inline asm: # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html diff --git a/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch b/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch index cd112c06a8..2d7bca6a77 100644 --- a/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch +++ b/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch @@ -1,4 +1,4 @@ -From 23184742b009ef1a8b2c0c2d79515334d4450cb9 Mon Sep 17 00:00:00 2001 +From 217cea231462e7703e8c9ea39c0a6833f799a420 Mon Sep 17 00:00:00 2001 From: Trevor Gamblin Date: Fri, 15 Sep 2023 08:48:33 -0400 Subject: [PATCH] skip no_stdout_fileno test due to load variability @@ -11,16 +11,15 @@ Upstream-Status: Inappropriate [OE-Specific] [YOCTO #15210] Signed-off-by: Trevor Gamblin - --- Lib/test/test_builtin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py -index de83b52..ba98fe8 100644 +index 4d03c46..b329b7a 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py -@@ -2300,6 +2300,7 @@ class PtyTests(unittest.TestCase): +@@ -2326,6 +2326,7 @@ class PtyTests(unittest.TestCase): # Check stdin/stdout error handler is used when invoking PyOS_Readline() self.check_input_tty("prompté", b"quux\xe9", "ascii") diff --git a/meta/recipes-devtools/python/python3/0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch b/meta/recipes-devtools/python/python3/0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch index 415db4bc5b..598ef08cc4 100644 --- a/meta/recipes-devtools/python/python3/0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch +++ b/meta/recipes-devtools/python/python3/0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch @@ -1,7 +1,8 @@ -From 51a048251c552d9ead29a2a3e4884c138fcf9c1c Mon Sep 17 00:00:00 2001 +From d07ca7fbd874e230dec4d4c6d650a66ea2a9008e Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Wed, 7 Feb 2024 15:32:45 +0100 -Subject: [PATCH] test_xml_etree.py: Fix for Expat >=2.6.0 with reparse deferral +Subject: [PATCH] test_xml_etree.py: Fix for Expat >=2.6.0 with reparse + deferral Upstream-Status: Submitted [https://github.com/python/cpython/pull/115138] Signed-off-by: Khem Raj @@ -12,10 +13,10 @@ Signed-off-by: Khem Raj create mode 100644 Misc/NEWS.d/next/Tests/2024-02-07-15-49-37.gh-issue-115133.WBajNr.rst diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py -index 53a4e9f..9a0119c 100644 +index b50898f..4578367 100644 --- a/Lib/test/test_xml_etree.py +++ b/Lib/test/test_xml_etree.py -@@ -1401,6 +1401,7 @@ class XMLPullParserTest(unittest.TestCase): +@@ -1403,6 +1403,7 @@ class XMLPullParserTest(unittest.TestCase): def test_simple_xml(self): for chunk_size in (None, 1, 5): with self.subTest(chunk_size=chunk_size): @@ -23,7 +24,7 @@ index 53a4e9f..9a0119c 100644 parser = ET.XMLPullParser() self.assert_event_tags(parser, []) self._feed(parser, "\n", chunk_size) -@@ -1410,16 +1411,17 @@ class XMLPullParserTest(unittest.TestCase): +@@ -1412,16 +1413,17 @@ class XMLPullParserTest(unittest.TestCase): chunk_size) self.assert_event_tags(parser, []) self._feed(parser, ">\n", chunk_size) @@ -52,6 +53,3 @@ index 0000000..4dc9c13 +++ b/Misc/NEWS.d/next/Tests/2024-02-07-15-49-37.gh-issue-115133.WBajNr.rst @@ -0,0 +1 @@ +Fix etree XMLPullParser tests for Expat >=2.6.0 with reparse deferral --- -2.43.0 - diff --git a/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch b/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch index ed1c1b9975..0661249bfd 100644 --- a/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch +++ b/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch @@ -1,4 +1,4 @@ -From 1438c3694665961aa9c478727846343ad31fa133 Mon Sep 17 00:00:00 2001 +From d0205c60d08f51d84bd8ddc07a57e8c71710fdad Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 17 Nov 2023 14:16:40 +0100 Subject: [PATCH] configure.ac: do not add a curses include path from the host @@ -10,16 +10,15 @@ as dnf failures). Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin - --- configure.ac | 6 ------ 1 file changed, 6 deletions(-) diff --git a/configure.ac b/configure.ac -index d81c19a..b15b765 100644 +index c49cd4f..affdedf 100644 --- a/configure.ac +++ b/configure.ac -@@ -6507,12 +6507,6 @@ AS_VAR_IF([have_panel], [no], [ +@@ -6508,12 +6508,6 @@ AS_VAR_IF([have_panel], [no], [ AC_MSG_RESULT([$have_panel (CFLAGS: $PANEL_CFLAGS, LIBS: $PANEL_LIBS)]) ]) diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch index c813b3975b..c1b20703e6 100644 --- a/meta/recipes-devtools/python/python3/makerace.patch +++ b/meta/recipes-devtools/python/python3/makerace.patch @@ -1,4 +1,4 @@ -From c1badb04004c78f376f77f8c41718d51947bf873 Mon Sep 17 00:00:00 2001 +From 9f827c29adbe656af3c8fc963fdd8f47aec0c442 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 13 Jul 2021 23:19:29 +0100 Subject: [PATCH] python3: Fix make race @@ -12,16 +12,15 @@ Add a dependency to avoid the race. Upstream-Status: Pending Signed-off-by: Richard Purdie - --- Makefile.pre.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index fc7ab79..fb0b525 100644 +index 381feb0..77bf09a 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2246,7 +2246,7 @@ COMPILEALL_OPTS=-j0 +@@ -2250,7 +2250,7 @@ COMPILEALL_OPTS=-j0 TEST_MODULES=@TEST_MODULES@ .PHONY: libinstall diff --git a/meta/recipes-devtools/python/python3_3.12.1.bb b/meta/recipes-devtools/python/python3_3.12.1.bb deleted file mode 100644 index b4916d8cef..0000000000 --- a/meta/recipes-devtools/python/python3_3.12.1.bb +++ /dev/null @@ -1,472 +0,0 @@ -SUMMARY = "The Python Programming Language" -HOMEPAGE = "http://www.python.org" -DESCRIPTION = "Python is a programming language that lets you work more quickly and integrate your systems more effectively." -LICENSE = "PSF-2.0" -SECTION = "devel/python" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=fcf6b249c2641540219a727f35d8d2c2" - -SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ - file://run-ptest \ - file://create_manifest3.py \ - file://get_module_deps3.py \ - file://python3-manifest.json \ - file://check_build_completeness.py \ - file://reformat_sysconfig.py \ - file://cgi_py.patch \ - file://0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch \ - file://0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch \ - file://crosspythonpath.patch \ - file://0001-test_locale.py-correct-the-test-output-format.patch \ - file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \ - file://0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch \ - file://0001-test_ctypes.test_find-skip-without-tools-sdk.patch \ - file://makerace.patch \ - file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \ - file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \ - file://deterministic_imports.patch \ - file://0001-Avoid-shebang-overflow-on-python-config.py.patch \ - file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \ - file://0001-skip-no_stdout_fileno-test-due-to-load-variability.patch \ - file://0001-test_storlines-skip-due-to-load-variability.patch \ - file://0001-gh-114492-Initialize-struct-termios-before-calling-t.patch \ - file://0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch \ - " - -SRC_URI:append:class-native = " \ - file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ - " - -SRC_URI[sha256sum] = "8dfb8f426fcd226657f9e2bd5f1e96e53264965176fa17d32658e873591aeb21" - -# exclude pre-releases for both python 2.x and 3.x -UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P\d+(\.\d+)+).tar" -UPSTREAM_CHECK_URI = "https://www.python.org/downloads/source/" - -CVE_PRODUCT = "python cpython" - -CVE_STATUS[CVE-2007-4559] = "disputed: Upstream consider this expected behaviour" -CVE_STATUS[CVE-2019-18348] = "not-applicable-config: This is not exploitable when glibc has CVE-2016-10739 fixed" -CVE_STATUS[CVE-2020-15523] = "not-applicable-platform: Issue only applies on Windows" -CVE_STATUS[CVE-2022-26488] = "not-applicable-platform: Issue only applies on Windows" -# The module will be removed in the future and flaws documented. -CVE_STATUS[CVE-2015-20107] = "upstream-wontfix: The mailcap module is insecure by design, so this can't be fixed in a meaningful way" -CVE_STATUS[CVE-2023-36632] = "disputed: Not an issue, in fact expected behaviour" - -PYTHON_MAJMIN = "3.12" - -S = "${WORKDIR}/Python-${PV}" - -BBCLASSEXTEND = "native nativesdk" - -inherit autotools pkgconfig qemu ptest multilib_header update-alternatives - -MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}" - -ALTERNATIVE:${PN}-dev = "python3-config" -ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config" -ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}" - - -DEPENDS = "bzip2-replacement-native expat libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux-libuuid libtirpc libnsl2 autoconf-archive-native ncurses" -DEPENDS:append:class-target = " python3-native" -DEPENDS:append:class-nativesdk = " python3-native" - -EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat" -EXTRA_OECONF:append:class-native = " --bindir=${bindir}/${PN}" -EXTRA_OECONF:append:class-target = " --with-build-python=nativepython3" -EXTRA_OECONF:append:class-nativesdk = " --with-build-python=nativepython3" - -export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/" - -EXTRANATIVEPATH += "python3-native" - -# LTO will be enabled via packageconfig depending upong distro features -LTO:class-target = "" - -CACHED_CONFIGUREVARS = " \ - ac_cv_file__dev_ptmx=yes \ - ac_cv_file__dev_ptc=no \ - ac_cv_working_tzset=yes \ -" -# set thread stack size to 2MB on musl for interpreter and stdlib C extensions -# so it does not run into stack limits due to musl's small thread stack -# This is only needed to build interpreter and not the subsequent modules -# Thats why CFLAGS_NODIST is modified instead of CFLAGS -CACHED_CONFIGUREVARS:append:libc-musl = "\ - CFLAGS_NODIST='${CFLAGS} -DTHREAD_STACK_SIZE=0x200000' \ -" - -# PGO currently causes builds to not be reproducible so disable by default, see YOCTO #13407 -PACKAGECONFIG ??= "editline gdbm ${@bb.utils.filter('DISTRO_FEATURES', 'lto', d)}" -PACKAGECONFIG[readline] = "--with-readline=readline,,readline,,,editline" -PACKAGECONFIG[editline] = "--with-readline=editline,,libedit,,,readline" -# Use profile guided optimisation by running PyBench inside qemu-user -PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native" -PACKAGECONFIG[tk] = ",,tk" -PACKAGECONFIG[tcl] = ",,tcl" -PACKAGECONFIG[gdbm] = ",,gdbm" -PACKAGECONFIG[lto] = "--with-lto,--without-lto" - -do_configure:prepend () { - mkdir -p ${B}/Modules - cat > ${B}/Modules/Setup.local << EOF -*disabled* -${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '_gdbm _dbm', d)} -${@bb.utils.contains_any('PACKAGECONFIG', 'readline editline', '', 'readline', d)} -${@bb.utils.contains('PACKAGECONFIG', 'tk', '', '_tkinter', d)} -EOF -} - -CPPFLAGS:append = " -I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid" - -# COMPILEALL_OPTS= ensures that .pyc are not compiled in parallel -# This was found to lock up builds, break reproducibility, and produce strange file ownership -# races. -# -# The upstream commit introducing the change was: -# https://github.com/python/cpython/commit/1a2dd82f56bd813aacc570e172cefe55a8a41504 -# -# The build lock up issue is reported here: -# https://bugs.python.org/issue45945 -# -# The repro failures are documented here: -# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20211130-yr_o1a8d/packages/diff-html/ - -EXTRA_OEMAKE = '\ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - LIB=${baselib} \ - COMPILEALL_OPTS= \ -' - -# Generate a Profile Guided Optimisation wrapper script that uses qemu-user for -# all cross builds. -write_pgo_wrapper:class-native = ":" -write_pgo_wrapper() { - if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then - cat >pgo-wrapper < ${B}/Modules/Setup.local << EOF +*disabled* +${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '_gdbm _dbm', d)} +${@bb.utils.contains_any('PACKAGECONFIG', 'readline editline', '', 'readline', d)} +${@bb.utils.contains('PACKAGECONFIG', 'tk', '', '_tkinter', d)} +EOF +} + +CPPFLAGS:append = " -I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid" + +# COMPILEALL_OPTS= ensures that .pyc are not compiled in parallel +# This was found to lock up builds, break reproducibility, and produce strange file ownership +# races. +# +# The upstream commit introducing the change was: +# https://github.com/python/cpython/commit/1a2dd82f56bd813aacc570e172cefe55a8a41504 +# +# The build lock up issue is reported here: +# https://bugs.python.org/issue45945 +# +# The repro failures are documented here: +# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20211130-yr_o1a8d/packages/diff-html/ + +EXTRA_OEMAKE = '\ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + LIB=${baselib} \ + COMPILEALL_OPTS= \ +' + +# Generate a Profile Guided Optimisation wrapper script that uses qemu-user for +# all cross builds. +write_pgo_wrapper:class-native = ":" +write_pgo_wrapper() { + if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then + cat >pgo-wrapper <