diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3')
39 files changed, 924 insertions, 1320 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 09f279ba1d..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 23294c6ba6896115828293fdb7e67b47b38ba675 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 b4357e3..fbec00d 100644 ---- a/setup.py -+++ b/setup.py -@@ -856,7 +856,6 @@ class PyBuildExt(build_ext): - 'termcap'): - readline_libs.append('termcap') - exts.append( 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-hardcode-lib-as-location-for-site-packages-an.patch b/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch deleted file mode 100644 index 661f52d01f..0000000000 --- a/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch +++ /dev/null @@ -1,196 +0,0 @@ -From 0fbdad1eaf541a8e92be81f39514cd249b3b0801 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Tue, 5 Feb 2019 15:52:02 +0100 -Subject: [PATCH] Do not hardcode "lib" as location for modules, site-packages - and lib-dynload - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - Include/pythonrun.h | 2 ++ - Lib/site.py | 4 ++-- - Makefile.pre.in | 5 +++-- - Modules/getpath.c | 18 ++++++++++++------ - Python/getplatform.c | 10 ++++++++++ - Python/sysmodule.c | 2 ++ - 6 files changed, 31 insertions(+), 10 deletions(-) - -diff --git a/Include/pythonrun.h b/Include/pythonrun.h -index 6f0c6fc..0a17edd 100644 ---- a/Include/pythonrun.h -+++ b/Include/pythonrun.h -@@ -7,6 +7,8 @@ - extern "C" { - #endif - -+PyAPI_FUNC(const char *) Py_GetLib(void); -+ - #ifndef Py_LIMITED_API - PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); - PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *); -diff --git a/Lib/site.py b/Lib/site.py -index ffd132b..b55f6d8 100644 ---- a/Lib/site.py -+++ b/Lib/site.py -@@ -334,12 +334,12 @@ def getsitepackages(prefixes=None): - seen.add(prefix) - - if os.sep == '/': -- sitepackages.append(os.path.join(prefix, "lib", -+ sitepackages.append(os.path.join(prefix, sys.lib, - "python%d.%d" % sys.version_info[:2], - "site-packages")) - else: - sitepackages.append(prefix) -- sitepackages.append(os.path.join(prefix, "lib", "site-packages")) -+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) - return sitepackages - - def addsitepackages(known_paths, prefixes=None): -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 6e81b2f..671a20e 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -142,7 +142,7 @@ LIBDIR= @libdir@ - MANDIR= @mandir@ - INCLUDEDIR= @includedir@ - CONFINCLUDEDIR= $(exec_prefix)/include --SCRIPTDIR= $(prefix)/lib -+SCRIPTDIR= @libdir@ - ABIFLAGS= @ABIFLAGS@ - - # Detailed destination directories -@@ -768,6 +768,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile - -DEXEC_PREFIX='"$(exec_prefix)"' \ - -DVERSION='"$(VERSION)"' \ - -DVPATH='"$(VPATH)"' \ -+ -DLIB='"$(LIB)"' \ - -o $@ $(srcdir)/Modules/getpath.c - - Programs/python.o: $(srcdir)/Programs/python.c -@@ -856,7 +857,7 @@ regen-opcode: - Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h - - Python/getplatform.o: $(srcdir)/Python/getplatform.c -- $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c -+ $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c - - Python/importdl.o: $(srcdir)/Python/importdl.c - $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c -diff --git a/Modules/getpath.c b/Modules/getpath.c -index e6a3e8e..0c62af6 100644 ---- a/Modules/getpath.c -+++ b/Modules/getpath.c -@@ -123,6 +123,7 @@ typedef struct { - wchar_t *exec_prefix; /* EXEC_PREFIX define */ - - wchar_t *lib_python; /* "lib/pythonX.Y" */ -+ wchar_t *multilib_python; /* "lib[suffix]/pythonX.Y" */ - wchar_t argv0_path[MAXPATHLEN+1]; - wchar_t zip_path[MAXPATHLEN+1]; /* ".../lib/pythonXY.zip" */ - -@@ -314,7 +315,7 @@ search_for_prefix(const _PyCoreConfig *core_config, - if (delim) { - *delim = L'\0'; - } -- joinpath(prefix, calculate->lib_python); -+ joinpath(prefix, calculate->multilib_python); - joinpath(prefix, LANDMARK); - return 1; - } -@@ -343,7 +344,7 @@ search_for_prefix(const _PyCoreConfig *core_config, - copy_absolute(prefix, calculate->argv0_path, MAXPATHLEN+1); - do { - n = wcslen(prefix); -- joinpath(prefix, calculate->lib_python); -+ joinpath(prefix, calculate->multilib_python); - joinpath(prefix, LANDMARK); - if (ismodule(prefix)) { - return 1; -@@ -355,7 +356,7 @@ search_for_prefix(const _PyCoreConfig *core_config, - /* Look at configure's PREFIX */ - wcsncpy(prefix, calculate->prefix, MAXPATHLEN); - prefix[MAXPATHLEN] = L'\0'; -- joinpath(prefix, calculate->lib_python); -+ joinpath(prefix, calculate->multilib_python); - joinpath(prefix, LANDMARK); - if (ismodule(prefix)) { - return 1; -@@ -427,7 +428,7 @@ search_for_exec_prefix(const _PyCoreConfig *core_config, - wcsncpy(exec_prefix, core_config->home, MAXPATHLEN); - } - exec_prefix[MAXPATHLEN] = L'\0'; -- joinpath(exec_prefix, calculate->lib_python); -+ joinpath(exec_prefix, calculate->multilib_python); - joinpath(exec_prefix, L"lib-dynload"); - return 1; - } -@@ -464,7 +465,7 @@ search_for_exec_prefix(const _PyCoreConfig *core_config, - copy_absolute(exec_prefix, calculate->argv0_path, MAXPATHLEN+1); - do { - n = wcslen(exec_prefix); -- joinpath(exec_prefix, calculate->lib_python); -+ joinpath(exec_prefix, calculate->multilib_python); - joinpath(exec_prefix, L"lib-dynload"); - if (isdir(exec_prefix)) { - return 1; -@@ -476,7 +477,7 @@ search_for_exec_prefix(const _PyCoreConfig *core_config, - /* Look at configure's EXEC_PREFIX */ - wcsncpy(exec_prefix, calculate->exec_prefix, MAXPATHLEN); - exec_prefix[MAXPATHLEN] = L'\0'; -- joinpath(exec_prefix, calculate->lib_python); -+ joinpath(exec_prefix, calculate->multilib_python); - joinpath(exec_prefix, L"lib-dynload"); - if (isdir(exec_prefix)) { - return 1; -@@ -871,6 +872,10 @@ calculate_init(PyCalculatePath *calculate, - if (!calculate->lib_python) { - return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); - } -+ calculate->multilib_python = Py_DecodeLocale(LIB "/python" VERSION, &len); -+ if (!calculate->multilib_python) { -+ return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); -+ } - return _Py_INIT_OK(); - } - -@@ -882,6 +887,7 @@ calculate_free(PyCalculatePath *calculate) - PyMem_RawFree(calculate->prefix); - PyMem_RawFree(calculate->exec_prefix); - PyMem_RawFree(calculate->lib_python); -+ PyMem_RawFree(calculate->multilib_python); - PyMem_RawFree(calculate->path_env); - } - -diff --git a/Python/getplatform.c b/Python/getplatform.c -index 81a0f7a..d55396b 100644 ---- a/Python/getplatform.c -+++ b/Python/getplatform.c -@@ -10,3 +10,13 @@ Py_GetPlatform(void) - { - return PLATFORM; - } -+ -+#ifndef LIB -+#define LIB "lib" -+#endif -+ -+const char * -+Py_GetLib(void) -+{ -+ return LIB; -+} -diff --git a/Python/sysmodule.c b/Python/sysmodule.c -index efe5b29..de77b17 100644 ---- a/Python/sysmodule.c -+++ b/Python/sysmodule.c -@@ -2319,6 +2319,8 @@ _PySys_BeginInit(PyObject **sysmod) - PyUnicode_FromString(Py_GetCopyright())); - SET_SYS_FROM_STRING("platform", - PyUnicode_FromString(Py_GetPlatform())); -+ SET_SYS_FROM_STRING("lib", -+ PyUnicode_FromString(Py_GetLib())); - SET_SYS_FROM_STRING("maxsize", - PyLong_FromSsize_t(PY_SSIZE_T_MAX)); - SET_SYS_FROM_STRING("float_info", 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-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 new file mode 100644 index 0000000000..026150f0e2 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch @@ -0,0 +1,47 @@ +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 + errors + +reading stdin can throw the same I/O errors as reading from master fd does, +e.g. when running under Yocto's test harness: +====================================================================== +ERROR: test_spawn_doesnt_hang (test.test_pty.PtyTest) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/usr/lib/python3.10/test/test_pty.py", line 316, in test_spawn_doesnt_hang + pty.spawn([sys.executable, '-c', 'print("hi there")']) + File "/usr/lib/python3.10/pty.py", line 181, in spawn + _copy(master_fd, master_read, stdin_read) + File "/usr/lib/python3.10/pty.py", line 157, in _copy + data = stdin_read(STDIN_FILENO) + File "/usr/lib/python3.10/pty.py", line 132, in _read + return os.read(fd, 1024) +OSError: [Errno 5] Input/output error + +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 1d97994..fa8821b 100644 +--- a/Lib/pty.py ++++ b/Lib/pty.py +@@ -178,7 +178,10 @@ def _copy(master_fd, master_read=_read, stdin_read=_read): + i_buf = i_buf[n:] + + 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: + stdin_avail = False + else: diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch deleted file mode 100644 index b97583682a..0000000000 --- a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch +++ /dev/null @@ -1,31 +0,0 @@ -From a21f4f8fa5e5c0601898740b4ac08ec84f41e190 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 18 Apr 2019 17:11:06 +0200 -Subject: [PATCH] Lib/sysconfig.py: fix another place where 'lib' is hardcoded - as the library path - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - Lib/sysconfig.py | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py -index d15cec8..87fa5e6 100644 ---- a/Lib/sysconfig.py -+++ b/Lib/sysconfig.py -@@ -20,10 +20,10 @@ __all__ = [ - - _INSTALL_SCHEMES = { - 'posix_prefix': { -- 'stdlib': '{installed_base}/lib/python{py_version_short}', -- 'platstdlib': '{platbase}/lib/python{py_version_short}', -- 'purelib': '{base}/lib/python{py_version_short}/site-packages', -- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', -+ 'stdlib': '{LIBDEST}', -+ 'platstdlib': '{LIBDEST}', -+ 'purelib': '{LIBDEST}/site-packages', -+ 'platlib': '{LIBDEST}/site-packages', - 'include': - '{installed_base}/include/python{py_version_short}{abiflags}', - 'platinclude': 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 new file mode 100644 index 0000000000..680254fab9 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch @@ -0,0 +1,32 @@ +From 71c194077bb907bfe423d3f3275f33a6c8ca0e74 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Fri, 17 Nov 2023 14:26:32 +0100 +Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration + file + +This allows correctly substituting them for target installs using +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 79c0510..91ebcb6 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -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-fix-Issue36464-parallel-build-race-problem.patch b/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch deleted file mode 100644 index 237645bc60..0000000000 --- a/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 840fda32c82550259d02a7a56a78a9c05162b1a1 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Wed, 8 May 2019 16:10:29 +0800 -Subject: [PATCH] Makefile: fix Issue36464 (parallel build race problem) - -When using make -j with the 'install' target, it's possible for altbininstall -(which normally creates BINDIR) and libainstall (which doesn't, though it -installs python-config there) to race, resulting in a failure due to -attempting to install python-config into a nonexistent BINDIR. Ensure it also -exists in the libainstall target. - -Upstream-Status: Submitted [https://github.com/python/cpython/pull/13186] - -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - Makefile.pre.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 15f3687..7e9f173 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1456,7 +1456,7 @@ LIBPL= @LIBPL@ - LIBPC= $(LIBDIR)/pkgconfig - - libainstall: @DEF_MAKE_RULE@ python-config -- @for i in $(LIBDIR) $(LIBPL) $(LIBPC); \ -+ @for i in $(LIBDIR) $(LIBPL) $(LIBPC) $(BINDIR); \ - do \ - if test ! -d $(DESTDIR)$$i; then \ - echo "Creating directory $$i"; \ --- -2.7.4 - 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 new file mode 100644 index 0000000000..197daa71a5 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch @@ -0,0 +1,72 @@ +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] + +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 | 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 e42c7ab..dff5227 100644 +--- a/Lib/test/_test_multiprocessing.py ++++ b/Lib/test/_test_multiprocessing.py +@@ -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)) +@@ -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 02cc3f4..51a4548 100644 +--- a/Lib/test/test_time.py ++++ b/Lib/test/test_time.py +@@ -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() +@@ -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 957839bf3e..0000000000 --- a/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 6c8ea7c1dacd42f3ba00440231ec0e6b1a38300d 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 6d06266c6a..51db2e3b2e 100644 ---- a/Python/marshal.c -+++ b/Python/marshal.c -@@ -275,9 +275,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) { --- -2.21.0 - 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 e7af88654d..0000000000 --- a/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch +++ /dev/null @@ -1,201 +0,0 @@ -From 7535c39951b9d15dd64c4669092a8582ba555466 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> ---- - configure.ac | 169 ++++++--------------------------------------------- - 1 file changed, 17 insertions(+), 152 deletions(-) - -diff --git a/configure.ac b/configure.ac -index a7de901e08..a73e2de51b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -727,158 +727,23 @@ 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 --#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 -+ ;; -+ *) -+ PLATFORM_TRIPLET=${target_cpu}-${target_os} -+ ;; -+esac - - if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then - if test x$PLATFORM_TRIPLET != x$MULTIARCH; then --- -2.21.0 - 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 1741f5753b..0000000000 --- a/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 17796e353acf08acd604610f34840a4a9d2f4b54 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/distutils/sysconfig.py | 2 ++ - Lib/sysconfig.py | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index e07a6c8..6b8c129 100644 ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -421,6 +421,8 @@ def _init_posix(): - platform=sys.platform, - multiarch=getattr(sys.implementation, '_multiarch', ''), - )) -+ 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 - global _config_vars -diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py -index 9ee4d31..e586abd 100644 ---- a/Lib/sysconfig.py -+++ b/Lib/sysconfig.py -@@ -412,6 +412,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-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 new file mode 100644 index 0000000000..8406ef30a2 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-gh-114492-Initialize-struct-termios-before-calling-t.patch @@ -0,0 +1,26 @@ +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) + +On Alpine Linux it could leave some field non-initialized. +(cherry picked from commit d22c066b802592932f9eb18434782299e80ca42e) + +Upstream-Status: Backport [https://github.com/python/cpython/commit/386c72d9928c51aa2c855ce592bd8022da3b407f] +Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + .../next/Library/2024-01-23-21-20-40.gh-issue-114492.vKxl5o.rst | 2 ++ + 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 +new file mode 100644 +index 0000000..8df8299 +--- /dev/null ++++ b/Misc/NEWS.d/next/Library/2024-01-23-21-20-40.gh-issue-114492.vKxl5o.rst +@@ -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/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch b/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch deleted file mode 100644 index a0ed7cc830..0000000000 --- a/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch +++ /dev/null @@ -1,49 +0,0 @@ -From ffe7797637f08cd6ee4c82e2d67462c5e194d30a Mon Sep 17 00:00:00 2001 -From: Jaewon Lee <jaewon.lee@xilinx.com> -Date: Thu, 25 Apr 2019 15:34:26 -0700 -Subject: [PATCH] main.c: if OEPYTHON3HOME is set use instead of PYTHONHOME - -There is one variable PYTHONHOME to determine where libraries are coming -from for both python2 and python3. This becomes an issue if only one has -libraries in the specified PYTHONHOME path, but they are using the same -PYTHONHOME. Creating another variable OEPYTHON3HOME to allow for a way -to set a different path for python3 - -Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> - -Upstream-Status: Inappropriate [OE specific configuration] ---- - Modules/main.c | 17 +++++++++++++---- - 1 file changed, 13 insertions(+), 4 deletions(-) - -diff --git a/Modules/main.c b/Modules/main.c -index a745381..b553e30 100644 ---- a/Modules/main.c -+++ b/Modules/main.c -@@ -1855,10 +1855,19 @@ config_init_home(_PyCoreConfig *config) - } - return _Py_INIT_OK(); - } -- -- int res = config_get_env_var_dup(&home, L"PYTHONHOME", "PYTHONHOME"); -- if (res < 0) { -- return DECODE_LOCALE_ERR("PYTHONHOME", res); -+ int res; -+ const char *oepython3home = config_get_env_var("OEPYTHON3HOME"); -+ if (oepython3home) { -+ res = config_get_env_var_dup(&home, L"OEPYTHON3HOME", "OEPYTHON3HOME"); -+ if (res < 0) { -+ return DECODE_LOCALE_ERR("OEPYTHON3HOME", res); -+ } -+ } -+ else { -+ res = config_get_env_var_dup(&home, L"PYTHONHOME", "PYTHONHOME"); -+ if (res < 0) { -+ return DECODE_LOCALE_ERR("PYTHONHOME", res); -+ } - } - config->home = home; - return _Py_INIT_OK(); --- -2.7.4 - 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 5735954628..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 2645317fef09afe31b01bb2c1d4fe5b9afdbb11a 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,7 +14,7 @@ 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> @@ -26,27 +26,27 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac -index a7de901..4a3681f 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 -@@ -695,7 +696,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]) ;; -@@ -979,7 +980,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*) @@ -55,16 +55,16 @@ index a7de901..4a3681f 100644 cc|*/cc) CC="$CC -Ae";; esac;; esac -@@ -1336,7 +1337,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_TARGET_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path}) -@@ -1426,7 +1427,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 @@ -73,34 +73,34 @@ index a7de901..4a3681f 100644 *clang*) # Any changes made here should be reflected in the GCC+Darwin case below PGO_PROF_GEN_FLAG="-fprofile-instr-generate" -@@ -1500,7 +1501,7 @@ then - WRAP="-fwrapv" - fi +@@ -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. -- case $CC in -+ case $cc_basename in - *clang*) - cc_is_clang=1 - ;; -@@ -1623,7 +1624,7 @@ yes) +-case $CC in ++case $cc_basename in + *clang*) + cc_is_clang=1 + ;; +@@ -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 +- 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) ;; -@@ -1965,7 +1966,7 @@ yes) esac - # ICC needs -fp-model strict or floats behave badly -case "$CC" in +case "$cc_basename" in - *icc*) - CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict" + *mpicc*) + CFLAGS_NODIST="$CFLAGS_NODIST" ;; -@@ -2727,7 +2728,7 @@ then +@@ -3482,7 +3483,7 @@ then then LINKFORSHARED="-Wl,--export-dynamic" fi;; @@ -109,12 +109,12 @@ index a7de901..4a3681f 100644 *gcc*) if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null then -@@ -5429,7 +5430,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-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 new file mode 100644 index 0000000000..fc52fdac26 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch @@ -0,0 +1,28 @@ +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 + +This is needed in multilib configurations where hardcoding 'lib' +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 122d441..79c0510 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -28,7 +28,7 @@ _INSTALL_SCHEMES = { + 'posix_prefix': { + 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', + 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', +- 'purelib': '{base}/lib/python{py_version_short}/site-packages', ++ 'purelib': '{base}/{platlibdir}/python{py_version_short}/site-packages', + 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', + 'include': + '{installed_base}/include/python{py_version_short}{abiflags}', 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 new file mode 100644 index 0000000000..b4fe946cba --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch @@ -0,0 +1,34 @@ +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 + +These tests need full packagegroup-core-buildessential, the +easiest way to dynamically check for that is looking for +'tools-sdk' in IMAGE_FEATURES. + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Tim Orling <timothy.t.orling@intel.com> + +--- + Lib/test/test_ctypes/test_find.py | 2 ++ + 1 file changed, 2 insertions(+) + +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) + ++ @unittest.skip("Needs IMAGE_FEATURE += \"tools-sdk\"") + def test_find_library_with_gcc(self): + with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None): + self.assertNotEqual(find_library('c'), None) + ++ @unittest.skip("Needs IMAGE_FEATURE += \"tools-sdk\"") + def test_find_library_with_ld(self): + with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None), \ + unittest.mock.patch("ctypes.util._findLib_gcc", lambda *args: None): 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 35b7e0c480..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,24 +23,24 @@ 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(-) diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py -index e2c2178..558d63c 100644 +index b0d7998..cb12153 100644 --- a/Lib/test/test_locale.py +++ b/Lib/test/test_locale.py -@@ -527,7 +527,7 @@ class TestMiscellaneous(unittest.TestCase): +@@ -557,7 +557,7 @@ class TestMiscellaneous(unittest.TestCase): self.skipTest('test needs Turkish locale') loc = locale.getlocale(locale.LC_CTYPE) if verbose: - print('testing with %a' % (loc,), end=' ', flush=True) + print('testing with %a...' % (loc,), end=' ', flush=True) - locale.setlocale(locale.LC_CTYPE, loc) - self.assertEqual(loc, locale.getlocale(locale.LC_CTYPE)) - --- -2.7.4 - + try: + locale.setlocale(locale.LC_CTYPE, loc) + except locale.Error as exc: 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/0002-Don-t-do-runtime-test-to-get-float-byte-order.patch b/meta/recipes-devtools/python/python3/0002-Don-t-do-runtime-test-to-get-float-byte-order.patch deleted file mode 100644 index 3721e7c2aa..0000000000 --- a/meta/recipes-devtools/python/python3/0002-Don-t-do-runtime-test-to-get-float-byte-order.patch +++ /dev/null @@ -1,199 +0,0 @@ -From fa96a7fd19e17b9c6b4dd01c3c3774fb382dddc6 Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -Date: Wed, 5 Sep 2018 11:45:52 +0100 -Subject: [PATCH] Don't do runtime test to get float byte order - -Python uses AC_RUN_IFELSE to determine the byte order for floats and doubles, -and falls back onto "I don't know" if it can't run code. This results in -crippled floating point numbers in Python, and the regression tests fail. - -Instead of running code, take a macro from autoconf-archive which compiles C -with a special double in which has an ASCII representation, and then greps the -binary to identify the format. - -Upstream-Status: Submitted [https://bugs.python.org/issue34585] -Signed-off-by: Ross Burton <ross.burton@intel.com> ---- - configure.ac | 72 +++------------------------ - m4/ax_c_float_words_bigendian.m4 | 83 ++++++++++++++++++++++++++++++++ - 2 files changed, 90 insertions(+), 65 deletions(-) - create mode 100644 m4/ax_c_float_words_bigendian.m4 - -diff --git a/configure.ac b/configure.ac -index 4a3681f..4ab19a6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4328,77 +4328,19 @@ fi - # * Check for various properties of floating point * - # ************************************************** - --AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64) --AC_CACHE_VAL(ac_cv_little_endian_double, [ --AC_RUN_IFELSE([AC_LANG_SOURCE([[ --#include <string.h> --int main() { -- double x = 9006104071832581.0; -- if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0) -- return 0; -- else -- return 1; --} --]])], --[ac_cv_little_endian_double=yes], --[ac_cv_little_endian_double=no], --[ac_cv_little_endian_double=no])]) --AC_MSG_RESULT($ac_cv_little_endian_double) --if test "$ac_cv_little_endian_double" = yes --then -- AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1, -- [Define if C doubles are 64-bit IEEE 754 binary format, stored -- with the least significant byte first]) --fi -- --AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64) --AC_CACHE_VAL(ac_cv_big_endian_double, [ --AC_RUN_IFELSE([AC_LANG_SOURCE([[ --#include <string.h> --int main() { -- double x = 9006104071832581.0; -- if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0) -- return 0; -- else -- return 1; --} --]])], --[ac_cv_big_endian_double=yes], --[ac_cv_big_endian_double=no], --[ac_cv_big_endian_double=no])]) --AC_MSG_RESULT($ac_cv_big_endian_double) --if test "$ac_cv_big_endian_double" = yes -+AX_C_FLOAT_WORDS_BIGENDIAN -+if test "$ax_cv_c_float_words_bigendian" = "yes" - then - AC_DEFINE(DOUBLE_IS_BIG_ENDIAN_IEEE754, 1, - [Define if C doubles are 64-bit IEEE 754 binary format, stored - with the most significant byte first]) --fi -- --# Some ARM platforms use a mixed-endian representation for doubles. --# While Python doesn't currently have full support for these platforms --# (see e.g., issue 1762561), we can at least make sure that float <-> string --# conversions work. --AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64) --AC_CACHE_VAL(ac_cv_mixed_endian_double, [ --AC_RUN_IFELSE([AC_LANG_SOURCE([[ --#include <string.h> --int main() { -- double x = 9006104071832581.0; -- if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0) -- return 0; -- else -- return 1; --} --]])], --[ac_cv_mixed_endian_double=yes], --[ac_cv_mixed_endian_double=no], --[ac_cv_mixed_endian_double=no])]) --AC_MSG_RESULT($ac_cv_mixed_endian_double) --if test "$ac_cv_mixed_endian_double" = yes -+elif test "$ax_cv_c_float_words_bigendian" = "no" - then -- AC_DEFINE(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754, 1, -+ AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1, - [Define if C doubles are 64-bit IEEE 754 binary format, stored -- in ARM mixed-endian order (byte order 45670123)]) -+ with the least significant byte first]) -+else -+ AC_MSG_ERROR([Cannot identify floating point byte order]) - fi - - # The short float repr introduced in Python 3.1 requires the -diff --git a/m4/ax_c_float_words_bigendian.m4 b/m4/ax_c_float_words_bigendian.m4 -new file mode 100644 -index 0000000..216b90d ---- /dev/null -+++ b/m4/ax_c_float_words_bigendian.m4 -@@ -0,0 +1,83 @@ -+# =============================================================================== -+# https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html -+# =============================================================================== -+# -+# SYNOPSIS -+# -+# AX_C_FLOAT_WORDS_BIGENDIAN([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN]) -+# -+# DESCRIPTION -+# -+# Checks the ordering of words within a multi-word float. This check is -+# necessary because on some systems (e.g. certain ARM systems), the float -+# word ordering can be different from the byte ordering. In a multi-word -+# float context, "big-endian" implies that the word containing the sign -+# bit is found in the memory location with the lowest address. This -+# implementation was inspired by the AC_C_BIGENDIAN macro in autoconf. -+# -+# The endianness is detected by first compiling C code that contains a -+# special double float value, then grepping the resulting object file for -+# certain strings of ASCII values. The double is specially crafted to have -+# a binary representation that corresponds with a simple string. In this -+# implementation, the string "noonsees" was selected because the -+# individual word values ("noon" and "sees") are palindromes, thus making -+# this test byte-order agnostic. If grep finds the string "noonsees" in -+# the object file, the target platform stores float words in big-endian -+# order. If grep finds "seesnoon", float words are in little-endian order. -+# If neither value is found, the user is instructed to specify the -+# ordering. -+# -+# LICENSE -+# -+# Copyright (c) 2008 Daniel Amelang <dan@amelang.net> -+# -+# Copying and distribution of this file, with or without modification, are -+# permitted in any medium without royalty provided the copyright notice -+# and this notice are preserved. This file is offered as-is, without any -+# warranty. -+ -+#serial 11 -+ -+AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN], -+ [AC_CACHE_CHECK(whether float word ordering is bigendian, -+ ax_cv_c_float_words_bigendian, [ -+ -+ax_cv_c_float_words_bigendian=unknown -+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ -+ -+double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0; -+ -+]])], [ -+ -+if grep noonsees conftest.$ac_objext >/dev/null ; then -+ ax_cv_c_float_words_bigendian=yes -+fi -+if grep seesnoon conftest.$ac_objext >/dev/null ; then -+ if test "$ax_cv_c_float_words_bigendian" = unknown; then -+ ax_cv_c_float_words_bigendian=no -+ else -+ ax_cv_c_float_words_bigendian=unknown -+ fi -+fi -+ -+])]) -+ -+case $ax_cv_c_float_words_bigendian in -+ yes) -+ m4_default([$1], -+ [AC_DEFINE([FLOAT_WORDS_BIGENDIAN], 1, -+ [Define to 1 if your system stores words within floats -+ with the most significant word first])]) ;; -+ no) -+ $2 ;; -+ *) -+ m4_default([$3], -+ [AC_MSG_ERROR([ -+ -+Unknown float word ordering. You need to manually preset -+ax_cv_c_float_words_bigendian=no (or yes) according to your system. -+ -+ ])]) ;; -+esac -+ -+])# AX_C_FLOAT_WORDS_BIGENDIAN diff --git a/meta/recipes-devtools/python/python3/0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch b/meta/recipes-devtools/python/python3/0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch deleted file mode 100644 index b9d5bc9c51..0000000000 --- a/meta/recipes-devtools/python/python3/0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch +++ /dev/null @@ -1,80 +0,0 @@ -From b881a79adcd4ae5ac8fe4f49d0fc77c47f777919 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Fri, 4 Aug 2017 11:16:14 +0800 -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: Submitted [https://github.com/python/cpython/pull/2999] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - setup.py | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/setup.py b/setup.py -index b7a36a6..658ead3 100644 ---- a/setup.py -+++ b/setup.py -@@ -1584,8 +1584,10 @@ class PyBuildExt(build_ext): - elif host_platform.startswith('netbsd'): - macros = dict() - libraries = [] -- -- else: # Linux and other unices -+ elif host_platform.startswith(('linux')): -+ macros = dict() -+ libraries = ['pthread'] -+ else: # Other unices - macros = dict() - libraries = ['rt'] - -@@ -1603,6 +1605,7 @@ class PyBuildExt(build_ext): - - exts.append ( Extension('_multiprocessing', multiprocessing_srcs, - define_macros=list(macros.items()), -+ libraries=libraries, - include_dirs=["Modules/_multiprocessing"])) - # End multiprocessing - 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 new file mode 100644 index 0000000000..0661249bfd --- /dev/null +++ b/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch @@ -0,0 +1,33 @@ +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 +differently to native curses (observed on current OpenSuse Tumbleweed +as dnf failures). + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + configure.ac | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c49cd4f..affdedf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -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" +-if test "$cross_compiling" = no; then +- CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" +-fi +- + # On Solaris, term.h requires curses.h + 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 0bafec73c0..0000000000 --- a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 6229502e5ae6cbb22240594f002638e9ef78f831 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 3dfd0a3..6c6b09a 100644 ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -97,7 +97,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: -@@ -140,7 +142,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: -@@ -148,7 +156,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): - - if os.name == "posix": - libpython = os.path.join(prefix, -- "lib", "python" + get_python_version()) -+ lib_basename, "python" + get_python_version()) - if standard_lib: - return libpython - else: 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 24e67b4ca1..0000000000 --- a/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch +++ /dev/null @@ -1,36 +0,0 @@ -From fead48c8b501a8d7c3db21df2e599f90f38f11d3 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 | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/setup.py b/setup.py -index fbec00d..b7a36a6 100644 ---- a/setup.py -+++ b/setup.py -@@ -1623,10 +1623,12 @@ class PyBuildExt(build_ext): - self.extensions.extend(exts) - - # Call the method for detecting whether _tkinter can be compiled -- self.detect_tkinter(inc_dirs, lib_dirs) -+ # self.detect_tkinter(inc_dirs, lib_dirs) - -- if '_tkinter' not in [e.name for e in self.extensions]: -- missing.append('_tkinter') -+ # tkinter module will not be avalaible as yocto -+ # doesn't have tk integrated (yet) -+ #if '_tkinter' not in [e.name for e in self.extensions]: -+ # missing.append('_tkinter') - - # Build the _uuid module if possible - uuid_incs = find_file("uuid.h", inc_dirs, ["/usr/include/uuid"]) 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/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py index 4da02a2991..045240ea0b 100644 --- a/meta/recipes-devtools/python/python3/create_manifest3.py +++ b/meta/recipes-devtools/python/python3/create_manifest3.py @@ -36,7 +36,7 @@ # Tha method to handle cached files does not work when a module includes a folder which # itself contains the pycache folder, gladly this is almost never the case. # -# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29 at gmail dot com> +# Author: Alejandro Enedino Hernandez Samaniego <alejandro at enedino dot org> import sys @@ -45,6 +45,11 @@ import json import os import collections +if '-d' in sys.argv: + debugFlag = '-d' +else: + debugFlag = '' + # Get python version from ${PYTHON_MAJMIN} pyversion = str(sys.argv[1]) @@ -84,6 +89,12 @@ def prepend_comments(comments, json_manifest): manifest.seek(0, 0) manifest.write(comments + json_contents) +def print_indent(msg, offset): + for l in msg.splitlines(): + msg = ' ' * offset + l + print(msg) + + # Read existing JSON manifest with open('python3-manifest.json') as manifest: # The JSON format doesn't allow comments so we hack the call to keep the comments using a marker @@ -99,7 +110,7 @@ with open('python3-manifest.json') as manifest: # Not exactly the same so it should not be a function # -print ('Getting dependencies for package: core') +print_indent('Getting dependencies for package: core', 0) # This special call gets the core dependencies and @@ -109,7 +120,7 @@ print ('Getting dependencies for package: core') # on the new core package, they will still find them # even when checking the old_manifest -output = subprocess.check_output([sys.executable, 'get_module_deps3.py', 'python-core-package']).decode('utf8') +output = subprocess.check_output([sys.executable, 'get_module_deps3.py', 'python-core-package', '%s' % debugFlag]).decode('utf8') for coredep in output.split(): coredep = coredep.replace(pyversion,'${PYTHON_MAJMIN}') if isCached(coredep): @@ -149,17 +160,16 @@ for filedep in old_manifest['core']['files']: # Get actual module name , shouldnt be affected by libdir/bindir, etc. pymodule = os.path.splitext(os.path.basename(os.path.normpath(filedep)))[0] - # We now know that were dealing with a python module, so we can import it # and check what its dependencies are. # We launch a separate task for each module for deterministic behavior. # Each module will only import what is necessary for it to work in specific. # The output of each task will contain each module's dependencies - print ('Getting dependencies for module: %s' % pymodule) - output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % pymodule]).decode('utf8') - print ('The following dependencies were found for module %s:\n' % pymodule) - print (output) + print_indent('Getting dependencies for module: %s' % pymodule, 2) + output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % pymodule, '%s' % debugFlag]).decode('utf8') + print_indent('The following dependencies were found for module %s:\n' % pymodule, 4) + print_indent(output, 6) for pymodule_dep in output.split(): @@ -178,12 +188,13 @@ for filedep in old_manifest['core']['files']: # all others will use this a base. +print('\n\nChecking for directories...\n') # To improve the script speed, we check which packages contain directories # since we will be looping through (only) those later. for pypkg in old_manifest: for filedep in old_manifest[pypkg]['files']: if isFolder(filedep): - print ('%s is a folder' % filedep) + print_indent('%s is a directory' % filedep, 2) if pypkg not in hasfolders: hasfolders.append(pypkg) if filedep not in allfolders: @@ -221,14 +232,14 @@ for pypkg in old_manifest: print('\n') print('--------------------------') - print ('Handling package %s' % pypkg) + print('Handling package %s' % pypkg) print('--------------------------') # Handle special cases, we assume that when they were manually added # to the manifest we knew what we were doing. special_packages = ['misc', 'modules', 'dev', 'tests'] if pypkg in special_packages or 'staticdev' in pypkg: - print('Passing %s package directly' % pypkg) + print_indent('Passing %s package directly' % pypkg, 2) new_manifest[pypkg] = old_manifest[pypkg] continue @@ -259,7 +270,7 @@ for pypkg in old_manifest: # Get actual module name , shouldnt be affected by libdir/bindir, etc. # We need to check if the imported module comes from another (e.g. sqlite3.dump) - path,pymodule = os.path.split(filedep) + path, pymodule = os.path.split(filedep) path = os.path.basename(path) pymodule = os.path.splitext(os.path.basename(pymodule))[0] @@ -279,10 +290,10 @@ for pypkg in old_manifest: # Each module will only import what is necessary for it to work in specific. # The output of each task will contain each module's dependencies - print ('\nGetting dependencies for module: %s' % pymodule) - output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % pymodule]).decode('utf8') - print ('The following dependencies were found for module %s:\n' % pymodule) - print (output) + print_indent('\nGetting dependencies for module: %s' % pymodule, 2) + output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % pymodule, '%s' % debugFlag]).decode('utf8') + print_indent('The following dependencies were found for module %s:\n' % pymodule, 4) + print_indent(output, 6) reportFILES = [] reportRDEPS = [] @@ -325,7 +336,7 @@ for pypkg in old_manifest: # print('Checking folder %s on package %s' % (pymodule_dep,pypkg_with_folder)) for folder_dep in old_manifest[pypkg_with_folder]['files'] or folder_dep in old_manifest[pypkg_with_folder]['cached']: if folder_dep == folder: - print ('%s folder found in %s' % (folder, pypkg_with_folder)) + print ('%s directory found in %s' % (folder, pypkg_with_folder)) folderFound = True if pypkg_with_folder not in new_manifest[pypkg]['rdepends'] and pypkg_with_folder != pypkg: new_manifest[pypkg]['rdepends'].append(pypkg_with_folder) @@ -424,7 +435,7 @@ prepend_comments(comments,'python3-manifest.json.new') if (repeated): error_msg = '\n\nERROR:\n' - error_msg += 'The following files are repeated (contained in more than one package),\n' + error_msg += 'The following files were found in more than one package),\n' error_msg += 'this is likely to happen when new files are introduced after an upgrade,\n' error_msg += 'please check which package should get it,\n modify the manifest accordingly and re-run the create_manifest task:\n' error_msg += '\n'.join(repeated) 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 fd12baad84..8e432b49af 100644 --- a/meta/recipes-devtools/python/python3/get_module_deps3.py +++ b/meta/recipes-devtools/python/python3/get_module_deps3.py @@ -3,12 +3,17 @@ # them out, the output of this execution will have all dependencies # for a specific module, which will be parsed an dealt on create_manifest.py # -# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com> +# Author: Alejandro Enedino Hernandez Samaniego <alejandro at enedino dot org> -# We can get a log per module, for all the dependencies that were found, but its messy. -debug=False import sys +import os + +# We can get a log per module, for all the dependencies that were found, but its messy. +if '-d' in sys.argv: + debug = True +else: + debug = False # We can get a list of the modules which are currently required to run python # so we run python-core and get its modules, we then import what we need @@ -18,16 +23,16 @@ import sys # We use importlib to achieve this, so we also need to know what modules importlib needs import importlib -core_deps=set(sys.modules) +core_deps = set(sys.modules) def fix_path(dep_path): import os # We DONT want the path on our HOST system - pivot='recipe-sysroot-native' - dep_path=dep_path[dep_path.find(pivot)+len(pivot):] + pivot = 'recipe-sysroot-native' + 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: @@ -45,19 +50,30 @@ def fix_path(dep_path): # Module to import was passed as an argument current_module = str(sys.argv[1]).rstrip() -if(debug==True): - log = open('log_%s' % current_module,'w') +if debug == True: + log = open('temp/log_%s' % current_module.strip('.*'),'w') log.write('Module %s generated the following dependencies:\n' % current_module) -try: - importlib.import_module('%s' % current_module) +try: + m = importlib.import_module(current_module) + # handle python packages which may not include all modules in the __init__ + 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")): + continue + submodule = "{}.{}".format(current_module, i[:-3]) + try: + importlib.import_module(submodule) + except: + pass # ignore all import or other exceptions raised during import except ImportError as e: - if (debug==True): - log.write('Module was not found') + if debug == True: + log.write('Module was not found\n') pass # Get current module dependencies, dif will contain a list of specific deps for this module -module_deps=set(sys.modules) +module_deps = set(sys.modules) # We handle the core package (1st pass on create_manifest.py) as a special case if current_module == 'python-core-package': @@ -69,14 +85,18 @@ else: # Check where each dependency came from for item in dif: - dep_path='' + # Main module returns script filename, __main matches mp_main__ as well + if 'main__' in item: + continue + + dep_path = '' try: - if (debug==True): - log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n') + if debug == True: + log.write('\nCalling: sys.modules[' + '%s' % item + '].__file__\n') dep_path = sys.modules['%s' % item].__file__ except AttributeError as e: # Deals with thread (builtin module) not having __file__ attribute - if debug==True: + if debug == True: log.write(item + ' ') log.write(str(e)) log.write('\n') @@ -84,11 +104,16 @@ for item in dif: except NameError as e: # Deals with NameError: name 'dep_path' is not defined # because module is not found (wasn't compiled?), e.g. bddsm - if (debug==True): + if debug == True: log.write(item+' ') log.write(str(e)) pass + if dep_path == '': + continue + if debug == True: + log.write('Dependency path found:\n%s\n' % dep_path) + # Site-customize is a special case since we (OpenEmbedded) put it there manually if 'sitecustomize' in dep_path: dep_path = '${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py' @@ -99,48 +124,51 @@ for item in dif: dep_path = fix_path(dep_path) import sysconfig - soabi=sysconfig.get_config_var('SOABI') + soabi = sysconfig.get_config_var('SOABI') # Check if its a shared library and deconstruct it if soabi in dep_path: - if (debug==True): - log.write('Shared library found in %s' % dep_path) + if debug == True: + log.write('Shared library found in %s\n' % dep_path) dep_path = dep_path.replace(soabi,'*') print (dep_path) continue + if "_sysconfigdata" in dep_path: + dep_path = dep_path.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*") - if (debug==True): + if debug == True: log.write(dep_path+'\n') # Prints out result, which is what will be used by create_manifest print (dep_path) - import imp - cpython_tag = imp.get_tag() - cached='' + cpython_tag = sys.implementation.cache_tag + cached = '' # Theres no naive way to find *.pyc files on python3 try: - if (debug==True): - log.write('Calling: sys.modules[' + '%s' % item + '].__cached__\n') + if debug == True: + log.write('\nCalling: sys.modules[' + '%s' % item + '].__cached__\n') cached = sys.modules['%s' % item].__cached__ except AttributeError as e: # Deals with thread (builtin module) not having __cached__ attribute - if debug==True: + if debug == True: log.write(item + ' ') log.write(str(e)) log.write('\n') pass except NameError as e: # Deals with NameError: name 'cached' is not defined - if (debug==True): + if debug == True: log.write(item+' ') log.write(str(e)) pass if cached is not None: - if (debug==True): - log.write(cached) + if debug == True: + log.write(cached + '\n') cached = fix_path(cached) cached = cached.replace(cpython_tag,'*') + if "_sysconfigdata" in cached: + cached = cached.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*") print (cached) -if debug==True: +if debug == True: log.close() diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch new file mode 100644 index 0000000000..c1b20703e6 --- /dev/null +++ b/meta/recipes-devtools/python/python3/makerace.patch @@ -0,0 +1,31 @@ +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 + +libainstall installs python-config.py but the .pyc cache files are generated +by the libinstall target. This means some builds may not generate the pyc files +for python-config.py depending on the order things happen in. This means builds +are not always reproducible. + +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 381feb0..77bf09a 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -2250,7 +2250,7 @@ COMPILEALL_OPTS=-j0 + TEST_MODULES=@TEST_MODULES@ + + .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 f23b8b7df0..0000000000 --- a/meta/recipes-devtools/python/python3/python-config.patch +++ /dev/null @@ -1,46 +0,0 @@ -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> -: -Index: Python-3.3.3/Misc/python-config.in -=================================================================== ---- Python-3.3.3.orig/Misc/python-config.in -+++ Python-3.3.3/Misc/python-config.in -@@ -4,7 +4,7 @@ - import getopt - import os - import sys --import sysconfig -+from distutils import sysconfig - - valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', - 'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir'] -@@ -32,14 +32,14 @@ if '--help' in opt_flags: - - for opt in opt_flags: - if opt == '--prefix': -- print(sysconfig.get_config_var('prefix')) -+ print(sysconfig.PREFIX) - - elif opt == '--exec-prefix': -- print(sysconfig.get_config_var('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 1ad85a9ff3..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": [ @@ -172,47 +189,39 @@ ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/compileall.py", + "${libdir}/python${PYTHON_MAJMIN}/filecmp.py", "${libdir}/python${PYTHON_MAJMIN}/py_compile.py" ], "cached": [ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/compileall.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/filecmp.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/py_compile.*.pyc" ] }, "compression": { "summary": "Python high-level compression support", "rdepends": [ - "core", - "shell", - "unixadmin" + "core" ], "files": [ - "${libdir}/python${PYTHON_MAJMIN}/_compression.py", - "${libdir}/python${PYTHON_MAJMIN}/bz2.py", "${libdir}/python${PYTHON_MAJMIN}/gzip.py", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bz2.*.so", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lzma.*.so", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/zlib.*.so", - "${libdir}/python${PYTHON_MAJMIN}/lzma.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__/_compression.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bz2.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/gzip.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/lzma.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tarfile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/zipfile.*.pyc" + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tarfile.*.pyc" ] }, "core": { "summary": "Python interpreter and core modules", "rdepends": [], "files": [ - "${bindir}/python*[!-config]", - "${includedir}/python${PYTHON_BINABI}/pyconfig*.h", - "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]", + "${bindir}/python${PYTHON_MAJMIN}", + "${bindir}/python${PYTHON_MAJMIN}.real", + "${bindir}/python3", + "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h", "${libdir}/python${PYTHON_MAJMIN}/UserDict.py", "${libdir}/python${PYTHON_MAJMIN}/UserList.py", "${libdir}/python${PYTHON_MAJMIN}/UserString.py", @@ -220,6 +229,7 @@ "${libdir}/python${PYTHON_MAJMIN}/_abcoll.py", "${libdir}/python${PYTHON_MAJMIN}/_bootlocale.py", "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.py", + "${libdir}/python${PYTHON_MAJMIN}/_compression.py", "${libdir}/python${PYTHON_MAJMIN}/_markupbase.py", "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.py", "${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py", @@ -228,6 +238,7 @@ "${libdir}/python${PYTHON_MAJMIN}/argparse.py", "${libdir}/python${PYTHON_MAJMIN}/ast.py", "${libdir}/python${PYTHON_MAJMIN}/bisect.py", + "${libdir}/python${PYTHON_MAJMIN}/bz2.py", "${libdir}/python${PYTHON_MAJMIN}/code.py", "${libdir}/python${PYTHON_MAJMIN}/codecs.py", "${libdir}/python${PYTHON_MAJMIN}/codeop.py", @@ -238,12 +249,14 @@ "${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", "${libdir}/python${PYTHON_MAJMIN}/encodings/latin_1.py", "${libdir}/python${PYTHON_MAJMIN}/encodings/utf_8.py", "${libdir}/python${PYTHON_MAJMIN}/enum.py", + "${libdir}/python${PYTHON_MAJMIN}/fnmatch.py", "${libdir}/python${PYTHON_MAJMIN}/functools.py", "${libdir}/python${PYTHON_MAJMIN}/genericpath.py", "${libdir}/python${PYTHON_MAJMIN}/getopt.py", @@ -251,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", @@ -258,19 +272,24 @@ "${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", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/__pycache__/time.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/__pycache__/xreadlines.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bisect.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bz2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_csv.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_heapq.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lzma.*.so", "${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", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/math.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/parser.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/readline.*.so", @@ -278,21 +297,30 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/time.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/unicodedata.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/xreadlines.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/zlib.*.so", "${libdir}/python${PYTHON_MAJMIN}/linecache.py", "${libdir}/python${PYTHON_MAJMIN}/locale.py", + "${libdir}/python${PYTHON_MAJMIN}/lzma.py", "${libdir}/python${PYTHON_MAJMIN}/new.py", "${libdir}/python${PYTHON_MAJMIN}/ntpath.py", "${libdir}/python${PYTHON_MAJMIN}/opcode.py", "${libdir}/python${PYTHON_MAJMIN}/operator.py", "${libdir}/python${PYTHON_MAJMIN}/optparse.py", "${libdir}/python${PYTHON_MAJMIN}/os.py", + "${libdir}/python${PYTHON_MAJMIN}/pathlib.py", + "${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", "${libdir}/python${PYTHON_MAJMIN}/selectors.py", + "${libdir}/python${PYTHON_MAJMIN}/shutil.py", "${libdir}/python${PYTHON_MAJMIN}/signal.py", "${libdir}/python${PYTHON_MAJMIN}/site.py", "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py", @@ -311,21 +339,28 @@ "${libdir}/python${PYTHON_MAJMIN}/tokenize.py", "${libdir}/python${PYTHON_MAJMIN}/traceback.py", "${libdir}/python${PYTHON_MAJMIN}/types.py", + "${libdir}/python${PYTHON_MAJMIN}/typing.py", + "${libdir}/python${PYTHON_MAJMIN}/urllib", + "${libdir}/python${PYTHON_MAJMIN}/urllib/parse.py", "${libdir}/python${PYTHON_MAJMIN}/warnings.py", - "${libdir}/python${PYTHON_MAJMIN}/weakref.py" + "${libdir}/python${PYTHON_MAJMIN}/weakref.py", + "${libdir}/python${PYTHON_MAJMIN}/zipimport.py", + "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]" ], "cached": [ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/__future__.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_bootlocale.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_collections_abc.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compression.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_markupbase.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sitebuiltins.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata*.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_weakrefset.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/abc.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/argparse.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ast.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bisect.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bz2.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/code.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/codecs.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/codeop.*.pyc", @@ -334,8 +369,10 @@ "${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", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/functools.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/genericpath.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getopt.*.pyc", @@ -344,13 +381,18 @@ "${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", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/lzma.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ntpath.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/opcode.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/operator.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/optparse.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/os.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pathlib.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/platform.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/posixpath.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/re.*.pyc", @@ -358,6 +400,7 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/rlcompleter.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/runpy.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/selectors.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shutil.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/signal.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/site.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/sre_compile.*.pyc", @@ -375,6 +418,7 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tokenize.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/traceback.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/types.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/typing.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/warnings.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/weakref.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/collections/__pycache__", @@ -384,9 +428,17 @@ "${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}/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" ] }, "crypt": { @@ -402,11 +454,10 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_blake2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_crypt.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hashlib.*.so", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha256.*.so", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha512.*.so" + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.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", @@ -416,7 +467,10 @@ "ctypes": { "summary": "Python C types support", "rdepends": [ - "core" + "core", + "crypt", + "io", + "math" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/ctypes", @@ -487,7 +541,7 @@ "files": [ "${base_libdir}/*.a", "${base_libdir}/*.o", - "${bindir}/python*-config", + "${bindir}/python*-config*", "${datadir}/aclocal", "${datadir}/pkgconfig", "${includedir}", @@ -514,33 +568,12 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/difflib.*.pyc" ] }, - "distutils-windows": { - "cached": [], - "files": [ - "${libdir}/python${PYTHON_MAJMIN}/distutils/command/wininst-*.exe" - ], - "rdepends": [ - "distutils" - ], - "summary": "Python distribution utilities (Windows installer stubs)" - }, - "distutils": { - "summary": "Python Distribution Utilities", - "rdepends": [ - "core" - ], - "files": [ - "${libdir}/python${PYTHON_MAJMIN}/distutils" - ], - "cached": [] - }, "doctest": { "summary": "Python framework for running examples in docstrings", "rdepends": [ "core", "debugger", "difflib", - "logging", "pprint", "shell", "stringold", @@ -561,7 +594,9 @@ "datetime", "io", "math", - "netclient" + "mime", + "netclient", + "stringold" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/email", @@ -571,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": [ @@ -597,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", @@ -632,17 +674,14 @@ "io": { "summary": "Python low-level I/O", "rdepends": [ - "compression", "core", "crypt", "math", "netclient", - "shell", - "unixadmin" + "shell" ], "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", @@ -653,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", @@ -675,7 +713,11 @@ "summary": "Python logging support", "rdepends": [ "core", - "stringold" + "io", + "netserver", + "pickle", + "stringold", + "threading" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/logging" @@ -689,7 +731,6 @@ "crypt", "datetime", "email", - "fcntl", "io", "math", "mime", @@ -760,9 +801,9 @@ "db", "debugger", "difflib", - "distutils", "doctest", "email", + "ensurepip", "fcntl", "html", "idle", @@ -786,22 +827,20 @@ "pydoc", "resource", "shell", - "smtpd", "sqlite3", + "statistics", "stringold", "syslog", "terminal", "threading", "tkinter", - "typing", + "tomllib", "unittest", "unixadmin", "venv", "xml", - "xmlrpc" - ], - "rrecommends": [ - "distutils-windows" + "xmlrpc", + "zoneinfo" ], "summary": "All Python modules" }, @@ -809,11 +848,18 @@ "summary": "Python multiprocessing support", "rdepends": [ "core", + "crypt", + "ctypes", "io", - "pickle" + "math", + "mmap", + "netclient", + "pickle", + "threading" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_multiprocessing.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_posixshmem.*.so", "${libdir}/python${PYTHON_MAJMIN}/multiprocessing" ], "cached": [] @@ -840,10 +886,10 @@ "${libdir}/python${PYTHON_MAJMIN}/mimetypes.py", "${libdir}/python${PYTHON_MAJMIN}/nntplib.py", "${libdir}/python${PYTHON_MAJMIN}/poplib.py", + "${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}/urllib/__pycache__", "${libdir}/python${PYTHON_MAJMIN}/uuid.py" ], "cached": [ @@ -853,6 +899,7 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mimetypes.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/nntplib.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/poplib.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/secrets.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtplib.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/telnetlib.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uuid.*.pyc" @@ -861,7 +908,6 @@ "netserver": { "summary": "Python Internet Protocol servers", "rdepends": [ - "compression", "core", "crypt", "datetime", @@ -871,9 +917,7 @@ "math", "mime", "netclient", - "shell", - "stringold", - "unixadmin" + "stringold" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/cgi.py", @@ -930,12 +974,8 @@ "rdepends": [ "core" ], - "files": [ - "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py" - ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc" - ] + "files": [], + "cached": [] }, "plistlib": { "summary": "Generate and parse Mac OS X .plist files", @@ -983,9 +1023,7 @@ "pydoc": { "summary": "Python interactive help support", "rdepends": [ - "core", - "netclient", - "pkgutil" + "core" ], "files": [ "${bindir}/pydoc*", @@ -1009,49 +1047,18 @@ "shell": { "summary": "Python shell-like functionality", "rdepends": [ - "compression", "core", - "stringold", - "unixadmin" + "stringold" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/cmd.py", - "${libdir}/python${PYTHON_MAJMIN}/fnmatch.py", "${libdir}/python${PYTHON_MAJMIN}/glob.py", - "${libdir}/python${PYTHON_MAJMIN}/shlex.py", - "${libdir}/python${PYTHON_MAJMIN}/shutil.py" + "${libdir}/python${PYTHON_MAJMIN}/shlex.py" ], "cached": [ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cmd.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/fnmatch.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/glob.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shutil.*.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" + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc" ] }, "sqlite3": { @@ -1066,6 +1073,22 @@ ], "cached": [] }, + "statistics": { + "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]", "rdepends": [ @@ -1109,13 +1132,11 @@ "core" ], "files": [ - "${libdir}/python${PYTHON_MAJMIN}/_dummy_thread.py", "${libdir}/python${PYTHON_MAJMIN}/_threading_local.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_queue.*.so", "${libdir}/python${PYTHON_MAJMIN}/queue.py" ], "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_dummy_thread.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_threading_local.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/queue.*.pyc" ] @@ -1131,26 +1152,39 @@ ], "cached": [] }, - "typing": { - "summary": "Python typing support", + "tomllib": { + "summary": "Provides an interface for parsing TOML", "rdepends": [ "core" ], "files": [ - "${libdir}/python${PYTHON_MAJMIN}/typing.py" + "${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__/typing.*.pyc" + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/turtle.*.pyc" ] - }, + }, "unittest": { "summary": "Python unit testing framework", "rdepends": [ + "asyncio", "core", "difflib", + "io", "logging", + "netclient", + "numbers", "pprint", - "shell", "stringold" ], "files": [ @@ -1168,7 +1202,6 @@ ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/getpass.py", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/grp.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/nis.*.so" ], "cached": [ @@ -1178,12 +1211,9 @@ "venv": { "summary": "Provides support for creating lightweight virtual environments with their own site directories, optionally isolated from system site directories.", "rdepends": [ - "compression", "core", "logging", - "shell", - "stringold", - "unixadmin" + "stringold" ], "files": [ "${bindir}/pyvenv*", @@ -1206,7 +1236,20 @@ "xmlrpc": { "summary": "Python XML-RPC support", "rdepends": [ + "compression", "core", + "crypt", + "datetime", + "email", + "html", + "io", + "math", + "mime", + "netclient", + "netserver", + "numbers", + "pydoc", + "stringold", "xml" ], "files": [ @@ -1214,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/reformat_sysconfig.py b/meta/recipes-devtools/python/python3/reformat_sysconfig.py index c4164313e8..5e2b12879d 100644 --- a/meta/recipes-devtools/python/python3/reformat_sysconfig.py +++ b/meta/recipes-devtools/python/python3/reformat_sysconfig.py @@ -16,6 +16,6 @@ with open(sys.argv[1], 'r') as f: with open(sys.argv[1], 'w') as f: for k in sorted(l.keys()): f.write('%s = ' % k) - pprint.pprint(l[k], stream=f, width=sys.maxsize) + pprint.pprint(l[k], stream=f, width=1) f.write('\n') diff --git a/meta/recipes-devtools/python/python3/run-ptest b/meta/recipes-devtools/python/python3/run-ptest index 3e45d3918c..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' -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' |