diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3')
34 files changed, 538 insertions, 921 deletions
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 new file mode 100644 index 0000000000..0d807db39f --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch @@ -0,0 +1,30 @@ +From 365399f17d35719d828ddd49182dcb401fb7791c Mon Sep 17 00:00:00 2001 +From: Paulo Neves <ptsneves@gmail.com> +Date: Tue, 7 Jun 2022 16:16:41 +0200 +Subject: [PATCH] Avoid shebang overflow on python-config.py + +The whole native path may be too big, leading to shebang +overflow. Let's just use the env shebang. + +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 77bf09a..6353c57 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -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 ++ @ # Otherwise we might get huge shebangs with native paths ++ sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' python-config.py + @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} + LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config + @ # On Darwin, always use the python version of the script, the shell diff --git a/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch b/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch deleted file mode 100644 index 59592821d7..0000000000 --- a/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 039c53dd5baddec3359a05be0bff46a3b32bbb84 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 25 Jan 2019 19:04:13 +0100 -Subject: [PATCH] Do not add /usr/lib/termcap to linker flags to avoid host - contamination - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - setup.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 20d7f35..ab18ff0 100644 ---- a/setup.py -+++ b/setup.py -@@ -957,7 +957,6 @@ class PyBuildExt(build_ext): - 'termcap'): - readline_libs.append('termcap') - self.add(Extension('readline', ['readline.c'], -- library_dirs=['/usr/lib/termcap'], - extra_link_args=readline_extra_link_args, - libraries=readline_libs)) - else: diff --git a/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch b/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch deleted file mode 100644 index 83fd52d87f..0000000000 --- a/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 148861fa16f2aaacd518770f337ea54b5182f981 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Tue, 29 Jan 2019 15:03:01 +0100 -Subject: [PATCH] Do not use the shell version of python-config that was - introduced in 3.4 - -Revert instead to the original python version: it has our tweaks and -outputs directories correctly. - -Upstream-Status: Inappropriate [oe-specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - Makefile.pre.in | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 2d2e11f..cc19942 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1431,12 +1431,9 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh - sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py - @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} - LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config -- @ # On Darwin, always use the python version of the script, the shell -- @ # version doesn't use the compiler customizations that are provided -- @ # in python (_osx_support.py). -- @if test `uname -s` = Darwin; then \ -- cp python-config.py python-config; \ -- fi -+ @ # In OpenEmbedded, always use the python version of the script, the shell -+ @ # version is broken in multiple ways, and doesn't return correct directories -+ cp python-config.py python-config - - - # Install the include files diff --git a/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch b/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch deleted file mode 100644 index 46179ba1d1..0000000000 --- a/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch +++ /dev/null @@ -1,27 +0,0 @@ -From cebb772d718a8f798ed5ae311a6e3e61534bea95 Mon Sep 17 00:00:00 2001 -From: Jeremy Puhlman <jpuhlman@mvista.com> -Date: Wed, 4 Mar 2020 00:06:42 +0000 -Subject: [PATCH] Don't search system for headers/libraries - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> - ---- - setup.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/setup.py b/setup.py -index 95e3e11..32a4d42 100644 ---- a/setup.py -+++ b/setup.py -@@ -840,8 +840,8 @@ class PyBuildExt(build_ext): - add_dir_to_list(self.compiler.include_dirs, - sysconfig.get_config_var("INCLUDEDIR")) - -- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib'] -- system_include_dirs = ['/usr/include'] -+ system_lib_dirs = [] -+ system_include_dirs = [] - # lib_dirs and inc_dirs are used to search for files; - # if a file is found in one of those directories, it can - # be assumed that no additional -I,-L directives are needed. diff --git a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch index d6aa9501a7..026150f0e2 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch @@ -1,4 +1,4 @@ -From d8521ee967937184eadc59fff1a30740ad181a98 Mon Sep 17 00:00:00 2001 +From f8a664cf1fc73e381d57d6927207286059744837 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Thu, 16 Sep 2021 16:35:37 +0200 Subject: [PATCH] Lib/pty.py: handle stdin I/O errors same way as master I/O @@ -24,26 +24,24 @@ So let's treat both channels the same. Upstream-Status: Submitted [https://github.com/python/cpython/pull/28388] Signed-off-by: Alexander Kanavin <alex@linutronix.de> + --- Lib/pty.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/pty.py b/Lib/pty.py -index 8d8ce40df5..35439c6b96 100644 +index 1d97994..fa8821b 100644 --- a/Lib/pty.py +++ b/Lib/pty.py -@@ -154,7 +154,10 @@ def _copy(master_fd, master_read=_read, stdin_read=_read): - os.write(STDOUT_FILENO, data) +@@ -178,7 +178,10 @@ def _copy(master_fd, master_read=_read, stdin_read=_read): + i_buf = i_buf[n:] - if STDIN_FILENO in rfds: + if stdin_avail and STDIN_FILENO in rfds: - data = stdin_read(STDIN_FILENO) + try: + data = stdin_read(STDIN_FILENO) + except OSError: + data = b"" if not data: - fds.remove(STDIN_FILENO) + stdin_avail = False else: --- -2.20.1 - diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch index b72c709130..680254fab9 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch @@ -1,6 +1,6 @@ -From aceaa16e25a8ab6a00f906c340843999635c8e23 Mon Sep 17 00:00:00 2001 +From 71c194077bb907bfe423d3f3275f33a6c8ca0e74 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> -Date: Fri, 10 Sep 2021 12:28:31 +0200 +Date: Fri, 17 Nov 2023 14:26:32 +0100 Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration file @@ -9,26 +9,24 @@ native python. Upstream-Status: Inappropriate [oe-core cross builds] Signed-off-by: Alexander Kanavin <alex@linutronix.de> + --- Lib/sysconfig.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py -index 95b48f6..84f6427 100644 +index 79c0510..91ebcb6 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py -@@ -613,6 +613,11 @@ def get_config_vars(*args): - _init_non_posix(_CONFIG_VARS) - if os.name == 'posix': - _init_posix(_CONFIG_VARS) -+ _CONFIG_VARS['installed_base'] = _CONFIG_VARS['prefix'] -+ _CONFIG_VARS['base'] = _CONFIG_VARS['prefix'] -+ _CONFIG_VARS['installed_platbase'] = _CONFIG_VARS['prefix'] -+ _CONFIG_VARS['platbase'] = _CONFIG_VARS['prefix'] -+ _CONFIG_VARS['platlibdir'] = _CONFIG_VARS['PLATLIBDIR'] - # For backward compatibility, see issue19555 - SO = _CONFIG_VARS.get('EXT_SUFFIX') - if SO is not None: --- -2.20.1 - +@@ -668,6 +668,11 @@ def _init_config_vars(): + _CONFIG_VARS['VPATH'] = sys._vpath + if os.name == 'posix': + _init_posix(_CONFIG_VARS) ++ _CONFIG_VARS['installed_base'] = _CONFIG_VARS['prefix'] ++ _CONFIG_VARS['base'] = _CONFIG_VARS['prefix'] ++ _CONFIG_VARS['installed_platbase'] = _CONFIG_VARS['prefix'] ++ _CONFIG_VARS['platbase'] = _CONFIG_VARS['prefix'] ++ _CONFIG_VARS['platlibdir'] = _CONFIG_VARS['PLATLIBDIR'] + if _HAS_USER_BASE: + # Setting 'userbase' is done below the call to the + # init function to enable using 'get_config_var' in diff --git a/meta/recipes-devtools/python/python3/0001-Makefile-do-not-compile-.pyc-in-parallel.patch b/meta/recipes-devtools/python/python3/0001-Makefile-do-not-compile-.pyc-in-parallel.patch deleted file mode 100644 index ea1efa9cac..0000000000 --- a/meta/recipes-devtools/python/python3/0001-Makefile-do-not-compile-.pyc-in-parallel.patch +++ /dev/null @@ -1,64 +0,0 @@ -From c501e121a872cbcef8ffe626c1de173a125be9f8 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 16 Jan 2020 12:34:20 +0100 -Subject: [PATCH] Makefile: do not compile .pyc 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/ - -Upstream-Status: Inappropriate [see issues above] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - Makefile.pre.in | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 1241112..5dfdf44 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1457,30 +1457,30 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c - fi - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -- -j0 -d $(LIBDEST) -f \ -+ -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ - $(DESTDIR)$(LIBDEST) - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -- -j0 -d $(LIBDEST) -f \ -+ -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ - $(DESTDIR)$(LIBDEST) - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ -- -j0 -d $(LIBDEST) -f \ -+ -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ - $(DESTDIR)$(LIBDEST) - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -- -j0 -d $(LIBDEST)/site-packages -f \ -+ -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -- -j0 -d $(LIBDEST)/site-packages -f \ -+ -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ -- -j0 -d $(LIBDEST)/site-packages -f \ -+ -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt 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 fa7735ff93..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,4 +1,4 @@ -From cf6a9100902484e4d028ee88742dd2487b014a98 Mon Sep 17 00:00:00 2001 +From 38278339832a57dbf5fa3ef21accaa03e2c814d7 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Wed, 30 Jan 2019 12:41:04 +0100 Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data @@ -10,16 +10,16 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index a3a02a7..d5503dd 100644 +index dd5e69f..381feb0 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -507,8 +507,7 @@ build_all_generate_profile: - $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)" - - run_profile_task: +@@ -658,8 +658,7 @@ profile-run-stamp: + # enabled. + $(MAKE) profile-gen-stamp + # Next, run the profile task to generate the profile information. - @ # FIXME: can't run for a cross build - $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true + ./pgo-wrapper ./python -m test.regrtest --pgo test_grammar test_opcodes test_dict test_builtin test_exceptions test_types test_support || true - - build_all_merge_profile: $(LLVM_PROF_MERGER) + # Remove profile generation binary since we are done with it. + $(MAKE) clean-retain-profile 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 a49d603d47..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,9 +1,8 @@ -From 0b25b66d4f54bd74615c9ff10f3fae8f0d1c548d Mon Sep 17 00:00:00 2001 +From 3471e3478e0760c42e04f8046cee2367ab5706d2 Mon Sep 17 00:00:00 2001 From: Yi Fan Yu <yifan.yu@windriver.com> Date: Thu, 1 Apr 2021 13:08:37 -0700 Subject: [PATCH] Skip failing tests due to load variability on YP AB - Skip these tests until AB-INT is solved. [YOCTO #14296] @@ -11,43 +10,63 @@ Skip these tests until AB-INT is solved. Upstream-Status: Inappropriate [OE-Specific] Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> + +Skip two additional tests due to suspected load variability failures. + +[YOCTO #15131] +[YOCTO #15177] + +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> --- - Lib/test/_test_multiprocessing.py | 2 ++ - Lib/test/test_time.py | 1 + - 2 files changed, 3 insertions(+) + 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 fd3b430..cda29f6 100644 +index e42c7ab..dff5227 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py -@@ -568,6 +568,7 @@ def test_close(self): - +@@ -682,6 +682,7 @@ class _TestProcess(BaseTestCase): close_queue(q) + @support.requires_resource('walltime') + @unittest.skip('timing related test, dependent on load') def test_many_processes(self): if self.TYPE == 'threads': self.skipTest('test not appropriate for {}'.format(self.TYPE)) -@@ -4715,6 +4716,7 @@ def signal_and_sleep(cls, sem, period): - sem.release() +@@ -2066,6 +2067,7 @@ class _TestBarrier(BaseTestCase): + except threading.BrokenBarrierError: + results.append(True) + ++ @unittest.skip('timing related test, dependent on load') + def test_timeout(self): + """ + Test wait(timeout) +@@ -5024,6 +5026,7 @@ class TestWait(unittest.TestCase): time.sleep(period) + @support.requires_resource('walltime') + @unittest.skip('timing related test, dependent on load') def test_wait_integer(self): from multiprocessing.connection import wait diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py -index 3258298..adcf407 100644 +index 02cc3f4..51a4548 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py -@@ -474,6 +474,7 @@ def test_monotonic(self): - def test_perf_counter(self): - time.perf_counter() - +@@ -492,6 +492,7 @@ class TimeTestCase(unittest.TestCase): + @unittest.skipIf( + support.is_wasi, "process_time not available on WASI" + ) + @unittest.skip('timing related test, dependent on load') def test_process_time(self): # process_time() should not include time spend during a sleep start = time.process_time() --- -2.17.1 - +@@ -505,6 +506,7 @@ class TimeTestCase(unittest.TestCase): + self.assertTrue(info.monotonic) + self.assertFalse(info.adjustable) + ++ @unittest.skip('timing related test, dependent on load') + def test_thread_time(self): + if not hasattr(time, 'thread_time'): + if sys.platform.startswith(('linux', 'win')): diff --git a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch new file mode 100644 index 0000000000..b6c6ac5a28 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch @@ -0,0 +1,37 @@ +From 37d058e841ba3bd89b5746cc5381afb014b11581 Mon Sep 17 00:00:00 2001 +From: Wentao Zhang <wentao.zhang@windriver.com> +Date: Mon, 20 Mar 2023 13:39:52 +0800 +Subject: [PATCH] Update test_sysconfig for posix_user purelib + +Steps to trigger the failed test: +Edit local.conf to add something as follows: + BASELIB = "lib64" + IMAGE_INSTALL:append = " python3-tests". +bitbake core-image-sato +runqemu qemux86-64 nographic slirp +Reproducer: + $python3 -m test test_sysconfig + +Update test_sysconfig.test_user_similar() for the posix_user scheme: +"purelib" doesn't use sys.platlibdir. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com> + +--- + Lib/test/test_sysconfig.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py +index b6dbf3d..5672590 100644 +--- a/Lib/test/test_sysconfig.py ++++ b/Lib/test/test_sysconfig.py +@@ -372,7 +372,7 @@ class TestSysConfig(unittest.TestCase): + expected = os.path.normpath(global_path.replace(base, user, 1)) + # bpo-44860: platlib of posix_user doesn't use sys.platlibdir, + # whereas posix_prefix does. +- if name == 'platlib': ++ if name == 'platlib' or name == 'purelib': + # Replace "/lib64/python3.11/site-packages" suffix + # with "/lib/python3.11/site-packages". + py_version_short = sysconfig.get_python_version() diff --git a/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch b/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch deleted file mode 100644 index 793385de91..0000000000 --- a/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 9f63e83b1cec872917647b11155edaffe399d103 Mon Sep 17 00:00:00 2001 -From: Inada Naoki <songofacandy@gmail.com> -Date: Sat, 14 Jul 2018 00:46:11 +0900 -Subject: [PATCH] Use FLAG_REF always for interned strings - -Upstream-Status: Submitted [https://github.com/python/cpython/pull/8226] -Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> - ---- - Python/marshal.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/Python/marshal.c b/Python/marshal.c -index c4538bd..2437160 100644 ---- a/Python/marshal.c -+++ b/Python/marshal.c -@@ -298,9 +298,14 @@ w_ref(PyObject *v, char *flag, WFILE *p) - if (p->version < 3 || p->hashtable == NULL) - return 0; /* not writing object references */ - -- /* if it has only one reference, it definitely isn't shared */ -- if (Py_REFCNT(v) == 1) -+ /* If it has only one reference, it definitely isn't shared. -+ * But we use TYPE_REF always for interned string, to PYC file stable -+ * as possible. -+ */ -+ if (Py_REFCNT(v) == 1 && -+ !(PyUnicode_CheckExact(v) && PyUnicode_CHECK_INTERNED(v))) { - return 0; -+ } - - entry = _Py_hashtable_get_entry(p->hashtable, v); - if (entry != NULL) { diff --git a/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch b/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch deleted file mode 100644 index c4fae09a5b..0000000000 --- a/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch +++ /dev/null @@ -1,209 +0,0 @@ -From 1ad771d86728ee2ed30e202e9768d8d825f96467 Mon Sep 17 00:00:00 2001 -From: Matthias Schoepfer <matthias.schoepfer@ithinx.io> -Date: Fri, 31 May 2019 15:34:34 +0200 -Subject: [PATCH] bpo-36852: proper detection of mips architecture for soft - float - -When (cross) compiling for softfloat mips, __mips_hard_float will not be -defined and detection of OS triplet in configure.ac / configure will fail. - -This also has to do with the custom detection of the build triplet. Trying -to do this in a more autoconf/autotools manner. - -Upstream-Status: Submitted [https://github.com/python/cpython/pull/13196] -Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io> - -%% original patch: 0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch ---- - configure.ac | 175 +++++++-------------------------------------------- - 1 file changed, 21 insertions(+), 154 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ede710e..bc81b0b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -710,160 +710,27 @@ fi - MULTIARCH=$($CC --print-multiarch 2>/dev/null) - AC_SUBST(MULTIARCH) - --AC_MSG_CHECKING([for the platform triplet based on compiler characteristics]) --cat >> conftest.c <<EOF --#undef bfin --#undef cris --#undef fr30 --#undef linux --#undef hppa --#undef hpux --#undef i386 --#undef mips --#undef powerpc --#undef sparc --#undef unix --#if defined(__ANDROID__) -- # Android is not a multiarch system. --#elif defined(__linux__) --# if defined(__x86_64__) && defined(__LP64__) -- x86_64-linux-gnu --# elif defined(__x86_64__) && defined(__ILP32__) -- x86_64-linux-gnux32 --# elif defined(__i386__) -- i386-linux-gnu --# elif defined(__aarch64__) && defined(__AARCH64EL__) --# if defined(__ILP32__) -- aarch64_ilp32-linux-gnu --# else -- aarch64-linux-gnu --# endif --# elif defined(__aarch64__) && defined(__AARCH64EB__) --# if defined(__ILP32__) -- aarch64_be_ilp32-linux-gnu --# else -- aarch64_be-linux-gnu --# endif --# elif defined(__alpha__) -- alpha-linux-gnu --# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP) --# if defined(__ARMEL__) -- arm-linux-gnueabihf --# else -- armeb-linux-gnueabihf --# endif --# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP) --# if defined(__ARMEL__) -- arm-linux-gnueabi --# else -- armeb-linux-gnueabi --# endif --# elif defined(__hppa__) -- hppa-linux-gnu --# elif defined(__ia64__) -- ia64-linux-gnu --# elif defined(__m68k__) && !defined(__mcoldfire__) -- m68k-linux-gnu --# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL) --# if _MIPS_SIM == _ABIO32 -- mipsisa32r6el-linux-gnu --# elif _MIPS_SIM == _ABIN32 -- mipsisa64r6el-linux-gnuabin32 --# elif _MIPS_SIM == _ABI64 -- mipsisa64r6el-linux-gnuabi64 --# else --# error unknown platform triplet --# endif --# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) --# if _MIPS_SIM == _ABIO32 -- mipsisa32r6-linux-gnu --# elif _MIPS_SIM == _ABIN32 -- mipsisa64r6-linux-gnuabin32 --# elif _MIPS_SIM == _ABI64 -- mipsisa64r6-linux-gnuabi64 --# else --# error unknown platform triplet --# endif --# elif defined(__mips_hard_float) && defined(_MIPSEL) --# if _MIPS_SIM == _ABIO32 -- mipsel-linux-gnu --# elif _MIPS_SIM == _ABIN32 -- mips64el-linux-gnuabin32 --# elif _MIPS_SIM == _ABI64 -- mips64el-linux-gnuabi64 --# else --# error unknown platform triplet --# endif --# elif defined(__mips_hard_float) --# if _MIPS_SIM == _ABIO32 -- mips-linux-gnu --# elif _MIPS_SIM == _ABIN32 -- mips64-linux-gnuabin32 --# elif _MIPS_SIM == _ABI64 -- mips64-linux-gnuabi64 --# else --# error unknown platform triplet --# endif --# elif defined(__or1k__) -- or1k-linux-gnu --# elif defined(__powerpc__) && defined(__SPE__) -- powerpc-linux-gnuspe --# elif defined(__powerpc64__) --# if defined(__LITTLE_ENDIAN__) -- powerpc64le-linux-gnu --# else -- powerpc64-linux-gnu --# endif --# elif defined(__powerpc__) -- powerpc-linux-gnu --# elif defined(__s390x__) -- s390x-linux-gnu --# elif defined(__s390__) -- s390-linux-gnu --# elif defined(__sh__) && defined(__LITTLE_ENDIAN__) -- sh4-linux-gnu --# elif defined(__sparc__) && defined(__arch64__) -- sparc64-linux-gnu --# elif defined(__sparc__) -- sparc-linux-gnu --# elif defined(__riscv) --# if __riscv_xlen == 32 -- riscv32-linux-gnu --# elif __riscv_xlen == 64 -- riscv64-linux-gnu --# else --# error unknown platform triplet --# endif --# else --# error unknown platform triplet --# endif --#elif defined(__FreeBSD_kernel__) --# if defined(__LP64__) -- x86_64-kfreebsd-gnu --# elif defined(__i386__) -- i386-kfreebsd-gnu --# else --# error unknown platform triplet --# endif --#elif defined(__gnu_hurd__) -- i386-gnu --#elif defined(__APPLE__) -- darwin --#elif defined(__VXWORKS__) -- vxworks --#else --# error unknown platform triplet --#endif -- --EOF -- --if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then -- PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '` -- AC_MSG_RESULT([$PLATFORM_TRIPLET]) --else -- AC_MSG_RESULT([none]) --fi --rm -f conftest.c conftest.out -+AC_CANONICAL_TARGET -+## Not using $target to filter out vendor -+## Need to handle macos, vxworks and hurd special (?) :-/ -+case ${target_os} in -+ darwin*) -+ PLATFORM_TRIPLET=darwin -+ ;; -+ hurd*) -+ PLATFORM_TRIPLET=i386-gnu -+ ;; -+ vxworks*) -+ PLATFORM_TRIPLET=vxworks -+ ;; -+ *) -+ if test "${target_cpu}" != "i686"; then -+ PLATFORM_TRIPLET=${target_cpu}-${target_os} -+ else -+ PLATFORM_TRIPLET=i386-${target_os} -+ fi -+ ;; -+esac - - if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then - if test x$PLATFORM_TRIPLET != x$MULTIARCH; then --- -2.24.1 - diff --git a/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch b/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch deleted file mode 100644 index b323ed4dd0..0000000000 --- a/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3a98c2eab187289dc8c55e36738c2c0f4216d906 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 31 Jan 2019 16:46:30 +0100 -Subject: [PATCH] distutils/sysconfig: append - STAGING_LIBDIR/python-sysconfigdata to sys.path - -So that target configuration can be used when running native python - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - Lib/sysconfig.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py -index a78c0b1..f5c5efe 100644 ---- a/Lib/sysconfig.py -+++ b/Lib/sysconfig.py -@@ -474,6 +474,8 @@ def _init_posix(vars): - """Initialize the module as appropriate for POSIX systems.""" - # _sysconfigdata is generated at build time, see _generate_posix_vars() - name = _get_sysconfigdata_name() -+ if 'STAGING_LIBDIR' in os.environ: -+ sys.path.append(os.environ['STAGING_LIBDIR']+'/python-sysconfigdata') - _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) - build_time_vars = _temp.build_time_vars - vars.update(build_time_vars) diff --git a/meta/recipes-devtools/python/python3/0001-gh-107811-tarfile-treat-overflow-in-UID-GID-as-failu.patch b/meta/recipes-devtools/python/python3/0001-gh-107811-tarfile-treat-overflow-in-UID-GID-as-failu.patch new file mode 100644 index 0000000000..88b84c6024 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-gh-107811-tarfile-treat-overflow-in-UID-GID-as-failu.patch @@ -0,0 +1,40 @@ +From 999d4e74d34afa233ad8ad0c70b989d77a21957f Mon Sep 17 00:00:00 2001 +From: Petr Viktorin <encukou@gmail.com> +Date: Wed, 23 Aug 2023 20:00:07 +0200 +Subject: [PATCH] gh-107811: tarfile: treat overflow in UID/GID as failure to + set it (#108369) + +Upstream-Status: Backport [https://github.com/python/cpython/pull/108369] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Lib/tarfile.py | 3 ++- + .../Library/2023-08-23-17-34-39.gh-issue-107811.3Fng72.rst | 3 +++ + 2 files changed, 5 insertions(+), 1 deletion(-) + create mode 100644 Misc/NEWS.d/next/Library/2023-08-23-17-34-39.gh-issue-107811.3Fng72.rst + +diff --git a/Lib/tarfile.py b/Lib/tarfile.py +index 3bbbcaa..473167d 100755 +--- a/Lib/tarfile.py ++++ b/Lib/tarfile.py +@@ -2557,7 +2557,8 @@ class TarFile(object): + os.lchown(targetpath, u, g) + else: + os.chown(targetpath, u, g) +- except OSError as e: ++ except (OSError, OverflowError) as e: ++ # OverflowError can be raised if an ID doesn't fit in `id_t` + raise ExtractError("could not change owner") from e + + def chmod(self, tarinfo, targetpath): +diff --git a/Misc/NEWS.d/next/Library/2023-08-23-17-34-39.gh-issue-107811.3Fng72.rst b/Misc/NEWS.d/next/Library/2023-08-23-17-34-39.gh-issue-107811.3Fng72.rst +new file mode 100644 +index 0000000..ffca413 +--- /dev/null ++++ b/Misc/NEWS.d/next/Library/2023-08-23-17-34-39.gh-issue-107811.3Fng72.rst +@@ -0,0 +1,3 @@ ++:mod:`tarfile`: extraction of members with overly large UID or GID (e.g. on ++an OS with 32-bit :c:type:`!id_t`) now fails in the same way as failing to ++set the ID. +-- +2.45.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 bfddc1ad52..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 5f9eea2c4f8716830f6c8855a3e10872119fae32 Mon Sep 17 00:00:00 2001 +From ababc7b1db8c406910766e11cdd04cbef7a706c9 Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Mon, 22 Oct 2018 15:19:51 +0800 Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler @@ -14,40 +14,39 @@ x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model' Here use cc_basename to replace CC for checking compiler to avoid such kind of issue. -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/python/cpython/pull/96399] Signed-off-by: Li Zhou <li.zhou@windriver.com> patch originally from Li Zhou, I just rework it to new version Signed-off-by: Changqing Li <changqing.li@windriver.com> - --- configure.ac | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac -index d60f052..e491e24 100644 +index 384718d..5a1d58b 100644 --- a/configure.ac +++ b/configure.ac -@@ -54,6 +54,7 @@ AC_CONFIG_HEADER(pyconfig.h) +@@ -137,6 +137,7 @@ AC_CONFIG_HEADERS([pyconfig.h]) AC_CANONICAL_HOST - AC_SUBST(build) - AC_SUBST(host) + AC_SUBST([build]) + AC_SUBST([host]) +LT_INIT - # pybuilddir.txt will be created by --generate-posix-vars in the Makefile - rm -f pybuilddir.txt -@@ -689,7 +690,7 @@ AC_MSG_RESULT($with_cxx_main) + AS_VAR_IF([cross_compiling], [maybe], + [AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])] +@@ -896,7 +897,7 @@ AC_SUBST([CXX]) preset_cxx="$CXX" if test -z "$CXX" then - case "$CC" in + case "$cc_basename" in - gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;; - cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;; - clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;; -@@ -975,7 +976,7 @@ rmdir CaseSensitiveTestDir + gcc) AC_PATH_TOOL([CXX], [g++], [g++], [notfound]) ;; + cc) AC_PATH_TOOL([CXX], [c++], [c++], [notfound]) ;; + clang|*/clang) AC_PATH_TOOL([CXX], [clang++], [clang++], [notfound]) ;; +@@ -1328,7 +1329,7 @@ rmdir CaseSensitiveTestDir case $ac_sys_system in hp*|HP*) @@ -56,16 +55,16 @@ index d60f052..e491e24 100644 cc|*/cc) CC="$CC -Ae";; esac;; esac -@@ -1366,7 +1367,7 @@ else - fi], - [AC_MSG_RESULT(no)]) +@@ -1854,7 +1855,7 @@ esac + ], + [AC_MSG_RESULT([no])]) if test "$Py_LTO" = 'true' ; then - case $CC in + case $cc_basename in *clang*) - AC_SUBST(LLVM_AR) - AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path}) -@@ -1456,7 +1457,7 @@ then + LDFLAGS_NOLTO="-fno-lto" + dnl Clang linker requires -flto in order to link objects with LTO information. +@@ -1983,7 +1984,7 @@ then fi fi LLVM_PROF_ERR=no @@ -74,7 +73,7 @@ index d60f052..e491e24 100644 *clang*) # Any changes made here should be reflected in the GCC+Darwin case below PGO_PROF_GEN_FLAG="-fprofile-instr-generate" -@@ -1517,7 +1518,7 @@ esac +@@ -2147,7 +2148,7 @@ AC_MSG_RESULT([$BOLT_APPLY_FLAGS]) # compiler and platform. BASECFLAGS tweaks need to be made even if the # user set OPT. @@ -83,25 +82,25 @@ index d60f052..e491e24 100644 *clang*) cc_is_clang=1 ;; -@@ -1653,7 +1654,7 @@ yes) +@@ -2419,7 +2420,7 @@ yes) # ICC doesn't recognize the option, but only emits a warning ## XXX does it emit an unused result warning and can it be disabled? -- case "$CC" in -+ case "$cc_basename" in - *icc*) - ac_cv_disable_unused_result_warning=no - ;; -@@ -1993,7 +1994,7 @@ yes) +- AS_CASE([$CC], ++ AS_CASE([$cc_basename], + [*icc*], [ac_cv_disable_unused_result_warning=no] + [PY_CHECK_CC_WARNING([disable], [unused-result])]) + AS_VAR_IF([ac_cv_disable_unused_result_warning], [yes], +@@ -2665,7 +2666,7 @@ yes) ;; esac -case "$CC" in +case "$cc_basename" in - *icc*) - # ICC needs -fp-model strict or floats behave badly - CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict" -@@ -2765,7 +2766,7 @@ then + *mpicc*) + CFLAGS_NODIST="$CFLAGS_NODIST" + ;; +@@ -3482,7 +3483,7 @@ then then LINKFORSHARED="-Wl,--export-dynamic" fi;; @@ -110,12 +109,12 @@ index d60f052..e491e24 100644 *gcc*) if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null then -@@ -5507,7 +5508,7 @@ if test "$have_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 - case $CC in + case $cc_basename in *gcc*) - AC_MSG_CHECKING(for gcc ipa-pure-const bug) + AC_MSG_CHECKING([for gcc ipa-pure-const bug]) saved_cflags="$CFLAGS" diff --git a/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch b/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch deleted file mode 100644 index 374433c68e..0000000000 --- a/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch +++ /dev/null @@ -1,70 +0,0 @@ -From bad7e6a625436402a01d03021fb9ccd58bc9930f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 9 Jan 2020 17:44:05 +0100 -Subject: [PATCH] setup.py: pass missing libraries to Extension for - multiprocessing module - -In the following commit: -... -commit e711cafab13efc9c1fe6c5cd75826401445eb585 -Author: Benjamin Peterson <benjamin@python.org> -Date: Wed Jun 11 16:44:04 2008 +0000 - - Merged revisions 64104,64117 via svnmerge from - svn+ssh://pythondev@svn.python.org/python/trunk -... -(see diff in setup.py) -It assigned libraries for multiprocessing module according -the host_platform, but not pass it to Extension. - -In glibc, the following commit caused two definition of -sem_getvalue are different. -https://sourceware.org/git/?p=glibc.git;a=commit;h=042e1521c794a945edc43b5bfa7e69ad70420524 -(see diff in nptl/sem_getvalue.c for detail) -`__new_sem_getvalue' is the latest sem_getvalue@@GLIBC_2.1 -and `__old_sem_getvalue' is to compat the old version -sem_getvalue@GLIBC_2.0. - -To build python for embedded Linux systems: -http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html -If not explicitly link to library pthread (-lpthread), it will -load glibc's sem_getvalue randomly at runtime. - -Such as build python on linux x86_64 host and run the python -on linux x86_32 target. If not link library pthread, it caused -multiprocessing bounded semaphore could not work correctly. -... ->>> import multiprocessing ->>> pool_sema = multiprocessing.BoundedSemaphore(value=1) ->>> pool_sema.acquire() -True ->>> pool_sema.release() -Traceback (most recent call last): - File "<stdin>", line 1, in <module> -ValueError: semaphore or lock released too many times -... - -And the semaphore issue also caused multiprocessing.Queue().put() hung. - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index d92face..f42bcbb 100644 ---- a/setup.py -+++ b/setup.py -@@ -1836,7 +1836,7 @@ class PyBuildExt(build_ext): - if (sysconfig.get_config_var('HAVE_SEM_OPEN') and not - sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')): - multiprocessing_srcs.append('_multiprocessing/semaphore.c') -- self.add(Extension('_multiprocessing', multiprocessing_srcs, -+ self.add(Extension('_multiprocessing', multiprocessing_srcs, libraries=['pthread'], - include_dirs=["Modules/_multiprocessing"])) - - if (not MS_WINDOWS and 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 new file mode 100644 index 0000000000..2d7bca6a77 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch @@ -0,0 +1,29 @@ +From 217cea231462e7703e8c9ea39c0a6833f799a420 Mon Sep 17 00:00:00 2001 +From: Trevor Gamblin <tgamblin@baylibre.com> +Date: Fri, 15 Sep 2023 08:48:33 -0400 +Subject: [PATCH] skip no_stdout_fileno test due to load variability + +Skip test_input_no_stdout_fileno so that it doesn't fail on systems +under heavy load. + +Upstream-Status: Inappropriate [OE-Specific] + +[YOCTO #15210] + +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> +--- + 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 4d03c46..b329b7a 100644 +--- a/Lib/test/test_builtin.py ++++ b/Lib/test/test_builtin.py +@@ -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") + ++ @unittest.skip("Test may fail under heavy load") + def test_input_no_stdout_fileno(self): + # Issue #24402: If stdin is the original terminal but stdout.fileno() + # fails, do not use the original stdout file descriptor diff --git a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch index 2b5a7d308c..fc52fdac26 100644 --- a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch @@ -1,4 +1,4 @@ -From 93346d1a2f5d4f7085391bc7c1230d85ebe00606 Mon Sep 17 00:00:00 2001 +From a5d429a0e1a4809c1ded7be7e45dcabeb82c53d8 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Sun, 12 Sep 2021 21:44:36 +0200 Subject: [PATCH] sysconfig.py: use platlibdir also for purelib @@ -8,15 +8,16 @@ is not correct. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex@linutronix.de> + --- Lib/sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py -index b70d392..c418acd 100644 +index 122d441..79c0510 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py -@@ -27,7 +27,7 @@ _INSTALL_SCHEMES = { +@@ -28,7 +28,7 @@ _INSTALL_SCHEMES = { 'posix_prefix': { 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', @@ -25,6 +26,3 @@ index b70d392..c418acd 100644 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', 'include': '{installed_base}/include/python{py_version_short}{abiflags}', --- -2.20.1 - diff --git a/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch b/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch index 7d684b3c43..b4fe946cba 100644 --- a/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch +++ b/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch @@ -1,4 +1,4 @@ -From 7a2bddfa437be633bb6945d0e6b7d6f27da870ad Mon Sep 17 00:00:00 2001 +From b64c131a576a4b4f821514e711ab91b1394fb4ff Mon Sep 17 00:00:00 2001 From: Tim Orling <timothy.t.orling@intel.com> Date: Fri, 18 Jun 2021 11:56:50 -0700 Subject: [PATCH] test_ctypes.test_find: skip without tools-sdk @@ -9,16 +9,17 @@ easiest way to dynamically check for that is looking for Upstream-Status: Inappropriate [oe-specific] -Signed-off-by: Tim Orling <timothy.t.orlign@intel.com> +Signed-off-by: Tim Orling <timothy.t.orling@intel.com> + --- - Lib/ctypes/test/test_find.py | 2 ++ + Lib/test/test_ctypes/test_find.py | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py -index 92ac184..0d009d1 100644 ---- a/Lib/ctypes/test/test_find.py -+++ b/Lib/ctypes/test/test_find.py -@@ -112,10 +112,12 @@ class FindLibraryLinux(unittest.TestCase): +diff --git a/Lib/test/test_ctypes/test_find.py b/Lib/test/test_ctypes/test_find.py +index 1ff9d01..59def26 100644 +--- a/Lib/test/test_ctypes/test_find.py ++++ b/Lib/test/test_ctypes/test_find.py +@@ -113,10 +113,12 @@ class FindLibraryLinux(unittest.TestCase): # LD_LIBRARY_PATH) self.assertEqual(find_library(libname), 'lib%s.so' % libname) diff --git a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch index c3d1e06d00..410a9fc7f1 100644 --- a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch +++ b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch @@ -1,4 +1,4 @@ -From b94995e0c694ec9561efec0d1a59b323340e6105 Mon Sep 17 00:00:00 2001 +From ef5728f0af14da5c9f80b0f038fe5bf6d44cb0e9 Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> Date: Mon, 5 Aug 2019 15:57:39 +0800 Subject: [PATCH] test_locale.py: correct the test output format @@ -23,19 +23,19 @@ Before this patch: Upstream-Status: Submitted [https://github.com/python/cpython/pull/15132] - Rebased for 3.9.4, still not accepted upstream Signed-off-by: Alejandro Hernandez <alejandro@enedino.org> Signed-off-by: Mingli Yu <mingli.yu@windriver.com> + --- Lib/test/test_locale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: Python-3.9.4/Lib/test/test_locale.py -=================================================================== ---- Python-3.9.4.orig/Lib/test/test_locale.py -+++ Python-3.9.4/Lib/test/test_locale.py -@@ -562,7 +562,7 @@ class TestMiscellaneous(unittest.TestCas +diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py +index b0d7998..cb12153 100644 +--- a/Lib/test/test_locale.py ++++ b/Lib/test/test_locale.py +@@ -557,7 +557,7 @@ class TestMiscellaneous(unittest.TestCase): self.skipTest('test needs Turkish locale') loc = locale.getlocale(locale.LC_CTYPE) if verbose: diff --git a/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch b/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch new file mode 100644 index 0000000000..1d4cda18b1 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch @@ -0,0 +1,46 @@ +From 9d4cdbde100798ba9fa1cf3f82dbaf18fd10a543 Mon Sep 17 00:00:00 2001 +From: Trevor Gamblin <tgamblin@baylibre.com> +Date: Wed, 8 May 2024 11:58:09 -0400 +Subject: [PATCH] test_shutdown: skip problematic test + +This test hangs frequently when run on the Autobuilder. Disable it in +testing until the cause can be determined. + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> +--- + Lib/test/test_concurrent_futures/test_shutdown.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/Lib/test/test_concurrent_futures/test_shutdown.py b/Lib/test/test_concurrent_futures/test_shutdown.py +index 7a4065afd4..6b878a48bf 100644 +--- a/Lib/test/test_concurrent_futures/test_shutdown.py ++++ b/Lib/test/test_concurrent_futures/test_shutdown.py +@@ -20,6 +20,7 @@ def sleep_and_print(t, msg): + sys.stdout.flush() + + ++@unittest.skip("skipping problematic test") + class ExecutorShutdownTest: + def test_run_after_shutdown(self): + self.executor.shutdown() +@@ -156,6 +157,7 @@ def timeout(_signum, _frame): + signal.signal(signal.SIGALRM, old_handler) + + ++@unittest.skip("skipping problematic test") + class ThreadPoolShutdownTest(ThreadPoolMixin, ExecutorShutdownTest, BaseTestCase): + def test_threads_terminate(self): + def acquire_lock(lock): +@@ -252,6 +254,7 @@ def test_cancel_futures_wait_false(self): + self.assertIn(out.strip(), [b"apple", b""]) + + ++@unittest.skip("skipping problematic test") + class ProcessPoolShutdownTest(ExecutorShutdownTest): + def test_processes_terminate(self): + def acquire_lock(lock): +-- +2.45.0 + diff --git a/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch b/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch new file mode 100644 index 0000000000..0d0eb08459 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch @@ -0,0 +1,30 @@ +From dc69a1afdb3ba619705ff71e14f19ed3142e422f Mon Sep 17 00:00:00 2001 +From: Trevor Gamblin <tgamblin@baylibre.com> +Date: Fri, 6 Oct 2023 10:59:44 -0400 +Subject: [PATCH] test_storlines: skip due to load variability + +This is yet another test that intermittently fails on the Yocto AB when +a worker is under heavy load, so skip it during testing. + +Upstream-Status: Inappropriate [OE-Specific] + +[YOCTO #14933] + +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> + +--- + Lib/test/test_ftplib.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py +index 2f191ea..dc29346 100644 +--- a/Lib/test/test_ftplib.py ++++ b/Lib/test/test_ftplib.py +@@ -626,6 +626,7 @@ class TestFTPClass(TestCase): + self.client.storbinary('stor', f, rest=r) + self.assertEqual(self.server.handler_instance.rest, str(r)) + ++ @unittest.skip('timing related test, dependent on load') + def test_storlines(self): + data = RETR_DATA.replace('\r\n', '\n').encode(self.client.encoding) + f = io.BytesIO(data) diff --git a/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch b/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch deleted file mode 100644 index 5823273af3..0000000000 --- a/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch +++ /dev/null @@ -1,38 +0,0 @@ -From a2dd127b4163aff6cc35af0d0251321964232ad4 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Mon, 7 Oct 2019 13:22:14 +0200 -Subject: [PATCH] setup.py: do not report missing dependencies for disabled - modules - -Reporting those missing dependencies is misleading as the modules would not -have been built anyway. This particularly matters in oe-core's automated -build completeness checker which relies on the report. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> -Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org> - ---- - setup.py | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/setup.py b/setup.py -index 7691258..ec3f2a4 100644 ---- a/setup.py -+++ b/setup.py -@@ -408,6 +408,14 @@ class PyBuildExt(build_ext): - print("%-*s %-*s %-*s" % (longest, e, longest, f, - longest, g)) - -+ # There is no need to report missing module dependencies, -+ # if the modules have been disabled in the first place. -+ # cannot use mods_disabled here, because remove_configured_extensions adds -+ # only disabled extensions into it (doesn't cover _dbm, _gdbm, readline -+ # we support disabling through PACKAGECONFIG) -+ sysconf_dis = sysconfig.get_config_var('MODDISABLED_NAMES').split() -+ self.missing = list(set(self.missing) - set(sysconf_dis)) -+ - if self.missing: - print() - print("Python build finished successfully!") 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 e04a91605c..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,8 +1,7 @@ -From 863c09f640a5dfd33ff22915b0d5fee7bc5df70a Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Sun, 16 Feb 2020 17:50:25 +0100 -Subject: [PATCH] configure.ac, setup.py: do not add a curses include path from - the host +From d0205c60d08f51d84bd8ddc07a57e8c71710fdad Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Fri, 17 Nov 2023 14:16:40 +0100 +Subject: [PATCH] configure.ac: do not add a curses include path from the host This leads to host contamination, and particularly can cause curses modules to fail at runtime if the host curses is configured @@ -13,16 +12,15 @@ Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- configure.ac | 6 ------ - setup.py | 2 -- - 2 files changed, 8 deletions(-) + 1 file changed, 6 deletions(-) diff --git a/configure.ac b/configure.ac -index 915f475..c911011 100644 +index c49cd4f..affdedf 100644 --- a/configure.ac +++ b/configure.ac -@@ -4828,12 +4828,6 @@ then - [Define if you have struct stat.st_mtimensec]) - fi +@@ -6508,12 +6508,6 @@ AS_VAR_IF([have_panel], [no], [ + AC_MSG_RESULT([$have_panel (CFLAGS: $PANEL_CFLAGS, LIBS: $PANEL_LIBS)]) + ]) -# first curses header check -ac_save_cppflags="$CPPFLAGS" @@ -30,19 +28,6 @@ index 915f475..c911011 100644 - CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" -fi - - AC_CHECK_HEADERS(curses.h ncurses.h) - # On Solaris, term.h requires curses.h -diff --git a/setup.py b/setup.py -index b0f1541..7208cd0 100644 ---- a/setup.py -+++ b/setup.py -@@ -973,8 +973,6 @@ class PyBuildExt(build_ext): - panel_library = 'panel' - if curses_library == 'ncursesw': - curses_defines.append(('HAVE_NCURSESW', '1')) -- if not CROSS_COMPILING: -- curses_includes.append('/usr/include/ncursesw') - # Bug 1464056: If _curses.so links with ncursesw, - # _curses_panel.so must link with panelw. - panel_library = 'panelw' + AC_CHECK_HEADERS([term.h], [], [], [ + #ifdef HAVE_CURSES_H diff --git a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch deleted file mode 100644 index cc64e3ecf7..0000000000 --- a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch +++ /dev/null @@ -1,60 +0,0 @@ -From f6411021856bafedd784748ec33494151e783b51 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 14 May 2013 15:00:26 -0700 -Subject: [PATCH] python3: Add target and native recipes - -Upstream-Status: Inappropriate [embedded specific] - -02/2015 Rebased for Python 3.4.2 - -The proper prefix is inside our staging area. -Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> -Signed-off-by: Phil Blundell <philb@gnu.org> -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> ---- - Lib/distutils/sysconfig.py | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index 3414a76..361d3a1 100644 ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -277,7 +277,9 @@ def get_python_inc(plat_specific=0, prefix=None): - If 'prefix' is supplied, use it instead of sys.base_prefix or - sys.base_exec_prefix -- i.e., ignore 'plat_specific'. - """ -- if prefix is None: -+ if prefix is None and os.environ.get('STAGING_INCDIR', ""): -+ prefix = os.environ['STAGING_INCDIR'].rstrip('include') -+ elif prefix is None: - prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX - if os.name == "posix": - if python_build: -@@ -320,7 +322,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): - If 'prefix' is supplied, use it instead of sys.base_prefix or - sys.base_exec_prefix -- i.e., ignore 'plat_specific'. - """ -- if prefix is None: -+ if os.environ.get('STAGING_LIBDIR', ""): -+ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1] -+ else: -+ lib_basename = "lib" -+ if prefix is None and os.environ.get('STAGING_LIBDIR', ""): -+ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename) -+ elif prefix is None: - if standard_lib: - prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX - else: -@@ -334,7 +342,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): - else: - # Pure Python - libdir = "lib" -- libpython = os.path.join(prefix, libdir, -+ libpython = os.path.join(prefix, lib_basename, - "python" + get_python_version()) - if standard_lib: - return libpython --- -2.20.1 - diff --git a/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch deleted file mode 100644 index 184540e794..0000000000 --- a/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch +++ /dev/null @@ -1,31 +0,0 @@ -From ba7202700578d435b07cfdfb7b57e83185752800 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan <andrei@gherzan.ro> -Date: Mon, 28 Jan 2019 15:57:54 +0000 -Subject: [PATCH] _tkinter module needs tk module along with tcl. tk is not yet - integrated in yocto so we skip the check for this module. Avoid a warning by - not adding this module to missing variable. - -Upstream-Status: Inappropriate [distribution] - -Also simply disable the tk module since its not in DEPENDS. -Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> - ---- - setup.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/setup.py b/setup.py -index ab18ff0..7691258 100644 ---- a/setup.py -+++ b/setup.py -@@ -1706,8 +1706,8 @@ class PyBuildExt(build_ext): - self.detect_decimal() - self.detect_ctypes() - self.detect_multiprocessing() -- if not self.detect_tkinter(): -- self.missing.append('_tkinter') -+# if not self.detect_tkinter(): -+# self.missing.append('_tkinter') - self.detect_uuid() - - ## # Uncomment these lines if you want to play with xxmodule.c diff --git a/meta/recipes-devtools/python/python3/cgi_py.patch b/meta/recipes-devtools/python/python3/cgi_py.patch index 6c4ba54320..8262c88e73 100644 --- a/meta/recipes-devtools/python/python3/cgi_py.patch +++ b/meta/recipes-devtools/python/python3/cgi_py.patch @@ -1,4 +1,4 @@ -From 62336285cba38017b35cb761c03f0c7e80a671a3 Mon Sep 17 00:00:00 2001 +From a56778372fe8dc7c42f5ffd911d89498c22dd064 Mon Sep 17 00:00:00 2001 From: Mark Hatle <mark.hatle@windriver.com> Date: Wed, 21 Sep 2011 20:55:33 -0500 Subject: [PATCH] Lib/cgi.py: Update the script as mentioned in the comment @@ -12,7 +12,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Lib/cgi.py b/Lib/cgi.py -index 8cf6687..094c7b4 100755 +index 8787567..ebe8652 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -1,13 +1,4 @@ diff --git a/meta/recipes-devtools/python/python3/crosspythonpath.patch b/meta/recipes-devtools/python/python3/crosspythonpath.patch index d789ab57d4..2c4aef0511 100644 --- a/meta/recipes-devtools/python/python3/crosspythonpath.patch +++ b/meta/recipes-devtools/python/python3/crosspythonpath.patch @@ -1,4 +1,8 @@ -configure.ac: add CROSSPYTHONPATH into PYTHONPATH for PYTHON_FOR_BUILD +From 5b66463c10fec1440e977d5a21a0167862d6d79c Mon Sep 17 00:00:00 2001 +From: Ricardo Ribalda <ricardo@ribalda.com> +Date: Tue, 18 Nov 2014 03:35:33 -0500 +Subject: [PATCH] configure.ac: add CROSSPYTHONPATH into PYTHONPATH for + PYTHON_FOR_BUILD When building x86->x86 the system will try to execute .so and related items from the default PYTHONPATH. This will fail if the target CPU contains @@ -10,16 +14,21 @@ Upstream-Status: Inappropriate [OE-Core integration specific] Credits-to: Mark Hatle <mark.hatle@windriver.com> Credits-to: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com> + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/configure.ac b/configure.ac -index 4ab19a6..7036a53 100644 +index cb9e198..d81c19a 100644 --- a/configure.ac +++ b/configure.ac -@@ -76,7 +76,7 @@ if test "$cross_compiling" = yes; then - AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) - fi - AC_MSG_RESULT($interp) -- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp -+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp - fi - elif test "$cross_compiling" = maybe; then - AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) +@@ -165,7 +165,7 @@ AC_ARG_WITH([build-python], + dnl Build Python interpreter is used for regeneration and freezing. + ac_cv_prog_PYTHON_FOR_REGEN=$with_build_python + PYTHON_FOR_FREEZE="$with_build_python" +- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$with_build_python ++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$with_build_python + AC_MSG_RESULT([$with_build_python]) + ], [ + AS_VAR_IF([cross_compiling], [yes], diff --git a/meta/recipes-devtools/python/python3/deterministic_imports.patch b/meta/recipes-devtools/python/python3/deterministic_imports.patch new file mode 100644 index 0000000000..104df94964 --- /dev/null +++ b/meta/recipes-devtools/python/python3/deterministic_imports.patch @@ -0,0 +1,40 @@ +From 039d5e652796b55f1132afa568c7432b6ed89afd Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Fri, 27 May 2022 17:05:44 +0100 +Subject: [PATCH] python3: Ensure stale empty python module directories don't + +There are two issues here. Firstly, the modules are accessed in on disk order. This +means behaviour seen on one system might not reproduce on another and is a real headache. + +Secondly, empty directories left behind by previous modules might be looked at. This +has caused a long string of different issues for us. + +As a result, patch this to a behaviour which works for us. + +Upstream-Status: Pending [need to talk to upstream to see if they'll take one or both fixes] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +--- + Lib/importlib/metadata/__init__.py | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py +index 82e0ce1..969cac4 100644 +--- a/Lib/importlib/metadata/__init__.py ++++ b/Lib/importlib/metadata/__init__.py +@@ -710,7 +710,14 @@ class Lookup: + self.infos = FreezableDefaultDict(list) + self.eggs = FreezableDefaultDict(list) + +- for child in path.children(): ++ for child in sorted(path.children()): ++ childpath = pathlib.Path(path.root, child) ++ try: ++ if childpath.is_dir() and not any(childpath.iterdir()): ++ # Empty directories aren't interesting ++ continue ++ except PermissionError: ++ continue + low = child.lower() + if low.endswith((".dist-info", ".egg-info")): + # rpartition is faster than splitext and suitable for this purpose. diff --git a/meta/recipes-devtools/python/python3/get_module_deps3.py b/meta/recipes-devtools/python/python3/get_module_deps3.py index 1f4c982aed..8e432b49af 100644 --- a/meta/recipes-devtools/python/python3/get_module_deps3.py +++ b/meta/recipes-devtools/python/python3/get_module_deps3.py @@ -32,7 +32,7 @@ def fix_path(dep_path): dep_path = dep_path[dep_path.find(pivot)+len(pivot):] if '/usr/bin' in dep_path: - dep_path = dep_path.replace('/usr/bin''${bindir}') + dep_path = dep_path.replace('/usr/bin','${bindir}') # Handle multilib, is there a better way? if '/usr/lib32' in dep_path: @@ -56,7 +56,7 @@ if debug == True: try: m = importlib.import_module(current_module) # handle python packages which may not include all modules in the __init__ - if os.path.basename(m.__file__) == "__init__.py": + if hasattr(m, '__file__') and os.path.basename(m.__file__) == "__init__.py": modulepath = os.path.dirname(m.__file__) for i in os.listdir(modulepath): if i.startswith("_") or not(i.endswith(".py")): diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch index b150c1cb38..c1b20703e6 100644 --- a/meta/recipes-devtools/python/python3/makerace.patch +++ b/meta/recipes-devtools/python/python3/makerace.patch @@ -1,4 +1,4 @@ -From 8b8583fb4f2bb3421e31ef06d17c04deec431c7e Mon Sep 17 00:00:00 2001 +From 9f827c29adbe656af3c8fc963fdd8f47aec0c442 Mon Sep 17 00:00:00 2001 From: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue, 13 Jul 2021 23:19:29 +0100 Subject: [PATCH] python3: Fix make race @@ -12,21 +12,20 @@ Add a dependency to avoid the race. Upstream-Status: Pending Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> - --- Makefile.pre.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 69d47a2..c471b60 100644 +index 381feb0..77bf09a 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1528,7 +1528,7 @@ TESTSUBDIRS= ctypes/test \ - unittest/test unittest/test/testmock - +@@ -2250,7 +2250,7 @@ COMPILEALL_OPTS=-j0 TEST_MODULES=@TEST_MODULES@ --libinstall: build_all $(srcdir)/Modules/xxmodule.c -+libinstall: build_all $(srcdir)/Modules/xxmodule.c libainstall + + .PHONY: libinstall +-libinstall: all $(srcdir)/Modules/xxmodule.c ++libinstall: all $(srcdir)/Modules/xxmodule.c libainstall @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ if test ! -d $(DESTDIR)$$i; then \ diff --git a/meta/recipes-devtools/python/python3/python-config.patch b/meta/recipes-devtools/python/python3/python-config.patch deleted file mode 100644 index c53f646af3..0000000000 --- a/meta/recipes-devtools/python/python3/python-config.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 57d073c12e7bede29919117b0141df14015eb27f Mon Sep 17 00:00:00 2001 -From: Tyler Hall <tylerwhall@gmail.com> -Date: Sun, 4 May 2014 20:06:43 -0400 -Subject: [PATCH] python-config: Revert to using distutils.sysconfig - -The newer sysconfig module shares some code with distutils.sysconfig, but the same modifications as in - -12-distutils-prefix-is-inside-staging-area.patch makes distutils.sysconfig - -affect the native runtime as well as cross building. Use the old, patched -implementation which returns paths in the staging directory and for the target, -as appropriate. - -Upstream-Status: Inappropriate [Embedded Specific] - -Signed-off-by: Tyler Hall <tylerwhall@gmail.com> - ---- - Misc/python-config.in | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/Misc/python-config.in b/Misc/python-config.in -index ebd99da..13e57ae 100644 ---- a/Misc/python-config.in -+++ b/Misc/python-config.in -@@ -6,7 +6,9 @@ - import getopt - import os - import sys --import sysconfig -+import warnings -+warnings.filterwarnings("ignore", category=DeprecationWarning) -+from distutils import sysconfig - - valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', - 'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir', -@@ -35,14 +35,14 @@ if '--help' in opt_flags: - - for opt in opt_flags: - if opt == '--prefix': -- print(getvar('prefix')) -+ print(sysconfig.PREFIX) - - elif opt == '--exec-prefix': -- print(getvar('exec_prefix')) -+ print(sysconfig.EXEC_PREFIX) - - elif opt in ('--includes', '--cflags'): -- flags = ['-I' + sysconfig.get_path('include'), -- '-I' + sysconfig.get_path('platinclude')] -+ flags = ['-I' + sysconfig.get_python_inc(), -+ '-I' + sysconfig.get_python_inc(plat_specific=True)] - if opt == '--cflags': - flags.extend(getvar('CFLAGS').split()) - print(' '.join(flags)) diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json index 2f5dad6486..46092d4004 100644 --- a/meta/recipes-devtools/python/python3/python3-manifest.json +++ b/meta/recipes-devtools/python/python3/python3-manifest.json @@ -152,6 +152,23 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/wave.*.pyc" ] }, + "cgitb": { + "summary": "Special exception handler for Python scripts", + "rdepends": [ + "core", + "crypt", + "html", + "io", + "math", + "pydoc" + ], + "files": [ + "${libdir}/python${PYTHON_MAJMIN}/cgitb.py" + ], + "cached": [ + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cgitb.*.pyc" + ] + }, "codecs": { "summary": "Python codec", "rdepends": [ @@ -189,12 +206,12 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/gzip.py", "${libdir}/python${PYTHON_MAJMIN}/tarfile.py", - "${libdir}/python${PYTHON_MAJMIN}/zipfile.py" + "${libdir}/python${PYTHON_MAJMIN}/zipfile", + "${libdir}/python${PYTHON_MAJMIN}/zipfile/_path" ], "cached": [ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/gzip.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tarfile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/zipfile.*.pyc" + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tarfile.*.pyc" ] }, "core": { @@ -232,6 +249,7 @@ "${libdir}/python${PYTHON_MAJMIN}/copy.py", "${libdir}/python${PYTHON_MAJMIN}/copyreg.py", "${libdir}/python${PYTHON_MAJMIN}/csv.py", + "${libdir}/python${PYTHON_MAJMIN}/dataclasses.py", "${libdir}/python${PYTHON_MAJMIN}/dis.py", "${libdir}/python${PYTHON_MAJMIN}/encodings", "${libdir}/python${PYTHON_MAJMIN}/encodings/aliases.py", @@ -246,6 +264,7 @@ "${libdir}/python${PYTHON_MAJMIN}/heapq.py", "${libdir}/python${PYTHON_MAJMIN}/imp.py", "${libdir}/python${PYTHON_MAJMIN}/importlib", + "${libdir}/python${PYTHON_MAJMIN}/importlib/_abc.py", "${libdir}/python${PYTHON_MAJMIN}/importlib/_bootstrap.py", "${libdir}/python${PYTHON_MAJMIN}/importlib/_bootstrap_external.py", "${libdir}/python${PYTHON_MAJMIN}/importlib/abc.py", @@ -253,6 +272,7 @@ "${libdir}/python${PYTHON_MAJMIN}/importlib/util.py", "${libdir}/python${PYTHON_MAJMIN}/inspect.py", "${libdir}/python${PYTHON_MAJMIN}/io.py", + "${libdir}/python${PYTHON_MAJMIN}/ipaddress.py", "${libdir}/python${PYTHON_MAJMIN}/keyword.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/__pycache__/_struct.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/__pycache__/binascii.*.so", @@ -266,6 +286,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_opcode.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_posixsubprocess.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_struct.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_typing.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/array.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/binascii.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/grp.*.so", @@ -290,7 +311,11 @@ "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py", "${libdir}/python${PYTHON_MAJMIN}/platform.py", "${libdir}/python${PYTHON_MAJMIN}/posixpath.py", - "${libdir}/python${PYTHON_MAJMIN}/re.py", + "${libdir}/python${PYTHON_MAJMIN}/re", + "${libdir}/python${PYTHON_MAJMIN}/re/_casefix.py", + "${libdir}/python${PYTHON_MAJMIN}/re/_compiler.py", + "${libdir}/python${PYTHON_MAJMIN}/re/_constants.py", + "${libdir}/python${PYTHON_MAJMIN}/re/_parser.py", "${libdir}/python${PYTHON_MAJMIN}/reprlib.py", "${libdir}/python${PYTHON_MAJMIN}/rlcompleter.py", "${libdir}/python${PYTHON_MAJMIN}/runpy.py", @@ -319,6 +344,7 @@ "${libdir}/python${PYTHON_MAJMIN}/urllib/parse.py", "${libdir}/python${PYTHON_MAJMIN}/warnings.py", "${libdir}/python${PYTHON_MAJMIN}/weakref.py", + "${libdir}/python${PYTHON_MAJMIN}/zipimport.py", "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]" ], "cached": [ @@ -343,6 +369,7 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/copy.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/copyreg.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/csv.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/dataclasses.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/dis.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/enum.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/fnmatch.*.pyc", @@ -354,6 +381,7 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imp.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/inspect.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/io.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ipaddress.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/keyword.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/linecache.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/locale.*.pyc", @@ -400,9 +428,15 @@ "${libdir}/python${PYTHON_MAJMIN}/encodings/__pycache__/latin_1.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/encodings/__pycache__/utf_8.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__", + "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/_abc.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/abc.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/machinery.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/util.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__", + "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__/_casefix.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__/_compiler.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__/_constants.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/re/__pycache__/_parser.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__", "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__/parse.*.pyc" ] @@ -422,9 +456,8 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hashlib.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha256.*.so", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha512.*.so" + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha2.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so" ], "cached": [ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/crypt.*.pyc", @@ -519,8 +552,7 @@ "${libdir}/pkgconfig" ], "rdepends": [ - "core", - "distutils" + "core" ], "summary": "Python development package" }, @@ -536,27 +568,6 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/difflib.*.pyc" ] }, - "distutils-windows": { - "summary": "Python distribution utilities (Windows installer stubs)", - "rdepends": [ - "core" - ], - "files": [], - "cached": [] - }, - "distutils": { - "summary": "Python Distribution Utilities", - "rdepends": [ - "compression", - "core", - "email", - "stringold" - ], - "files": [ - "${libdir}/python${PYTHON_MAJMIN}/distutils" - ], - "cached": [] - }, "doctest": { "summary": "Python framework for running examples in docstrings", "rdepends": [ @@ -595,6 +606,16 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imaplib.*.pyc" ] }, + "ensurepip": { + "summary": "Support for bootstrapping the pip installer", + "rdepends": [ + "core" + ], + "files": [ + "${libdir}/python${PYTHON_MAJMIN}/ensurepip/" + ], + "cached": [] + }, "fcntl": { "summary": "Python's fcntl interface", "rdepends": [ @@ -621,12 +642,9 @@ "core" ], "files": [ - "${libdir}/python${PYTHON_MAJMIN}/formatter.py", "${libdir}/python${PYTHON_MAJMIN}/html" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/formatter.*.pyc" - ] + "cached": [] }, "idle": { "summary": "Python Integrated Development Environment", @@ -664,7 +682,6 @@ ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/_pyio.py", - "${libdir}/python${PYTHON_MAJMIN}/ipaddress.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_socket.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_ssl.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/termios.*.so", @@ -675,7 +692,6 @@ ], "cached": [ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pyio.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ipaddress.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pipes.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socket.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ssl.*.pyc", @@ -715,7 +731,6 @@ "crypt", "datetime", "email", - "fcntl", "io", "math", "mime", @@ -786,9 +801,9 @@ "db", "debugger", "difflib", - "distutils", "doctest", "email", + "ensurepip", "fcntl", "html", "idle", @@ -812,22 +827,20 @@ "pydoc", "resource", "shell", - "smtpd", "sqlite3", - "statistics", + "statistics", "stringold", "syslog", "terminal", "threading", "tkinter", + "tomllib", "unittest", "unixadmin", "venv", "xml", - "xmlrpc" - ], - "rrecommends": [ - "distutils-windows" + "xmlrpc", + "zoneinfo" ], "summary": "All Python modules" }, @@ -876,6 +889,7 @@ "${libdir}/python${PYTHON_MAJMIN}/secrets.py", "${libdir}/python${PYTHON_MAJMIN}/smtplib.py", "${libdir}/python${PYTHON_MAJMIN}/telnetlib.py", + "${libdir}/python${PYTHON_MAJMIN}/urllib", "${libdir}/python${PYTHON_MAJMIN}/uuid.py" ], "cached": [ @@ -980,8 +994,7 @@ "pprint": { "summary": "Python pretty-print support", "rdepends": [ - "core", - "profile" + "core" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/pprint.py" @@ -997,14 +1010,12 @@ ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/cProfile.py", - "${libdir}/python${PYTHON_MAJMIN}/dataclasses.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lsprof.*.so", "${libdir}/python${PYTHON_MAJMIN}/profile.py", "${libdir}/python${PYTHON_MAJMIN}/pstats.py" ], "cached": [ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cProfile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/dataclasses.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/profile.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc" ] @@ -1050,31 +1061,6 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc" ] }, - "smtpd": { - "summary": "Python Simple Mail Transport Daemon", - "rdepends": [ - "core", - "crypt", - "datetime", - "email", - "io", - "math", - "mime", - "netclient", - "stringold" - ], - "files": [ - "${bindir}/smtpd.py", - "${libdir}/python${PYTHON_MAJMIN}/asynchat.py", - "${libdir}/python${PYTHON_MAJMIN}/asyncore.py", - "${libdir}/python${PYTHON_MAJMIN}/smtpd.py" - ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/asynchat.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/asyncore.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtpd.*.pyc" - ] - }, "sqlite3": { "summary": "Python Sqlite3 database support", "rdepends": [ @@ -1088,18 +1074,20 @@ "cached": [] }, "statistics": { - "summary": "Basic statistics module", - "rdepends": [ - "core", - "math", - "numbers" - ], - "files": [ - "${libdir}/python${PYTHON_MAJMIN}/statistics.py" - ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/statistics.*.pyc" - ] + "summary": "Basic statistics module", + "rdepends": [ + "core", + "crypt", + "math", + "numbers" + ], + "files": [ + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_statistics.*.so", + "${libdir}/python${PYTHON_MAJMIN}/statistics.py" + ], + "cached": [ + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/statistics.*.pyc" + ] }, "stringold": { "summary": "Python string APIs [deprecated]", @@ -1159,11 +1147,33 @@ "core" ], "files": [ - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.*.so", "${libdir}/python${PYTHON_MAJMIN}/tkinter" ], "cached": [] }, + "tomllib": { + "summary": "Provides an interface for parsing TOML", + "rdepends": [ + "core" + ], + "files": [ + "${libdir}/python${PYTHON_MAJMIN}/tomllib/" + ], + "cached": [] + }, + "turtle": { + "summary": "Turtle graphics is a popular way for introducing programming to kids.", + "rdepends": [ + "tkinter" + ], + "files": [ + "${libdir}/python${PYTHON_MAJMIN}/turtle.py" + ], + "cached": [ + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/turtle.*.pyc" + ] + }, "unittest": { "summary": "Python unit testing framework", "rdepends": [ @@ -1231,7 +1241,6 @@ "crypt", "datetime", "email", - "fcntl", "html", "io", "math", @@ -1248,5 +1257,30 @@ "${libdir}/python${PYTHON_MAJMIN}/xmlrpc/__pycache__" ], "cached": [] + }, + "zipapp": { + "summary": "Tools to manage the creation of zip files containing Python code", + "rdepends": [ + "compression", + "core" + ], + "files": [ + "${libdir}/python${PYTHON_MAJMIN}/zipapp.py" + ], + "cached": [ + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/zipapp.*.pyc" + ] + }, + "zoneinfo": { + "summary": "IANA time zone support", + "rdepends": [ + "core", + "datetime" + ], + "files": [ + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_zoneinfo.*.so", + "${libdir}/python${PYTHON_MAJMIN}/zoneinfo" + ], + "cached": [] } } diff --git a/meta/recipes-devtools/python/python3/run-ptest b/meta/recipes-devtools/python/python3/run-ptest index 405b07f495..d1c26c11e2 100644 --- a/meta/recipes-devtools/python/python3/run-ptest +++ b/meta/recipes-devtools/python/python3/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh - -python3 -m test -v | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -r -e '/\.\.\. (ERROR|FAIL)/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g' +SKIPPED_TESTS= +{ SETUPTOOLS_USE_DISTUTILS=nonlocal python3 -m test $SKIPPED_TESTS -v -j 4 || echo "FAIL: python3" ; } | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -r -e '/\.\.\. (ERROR|FAIL)/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g' |