summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-10-11 11:40:40 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-14 11:57:38 +0100
commitfae4ba632bc739cdf7369659f9b3bea2dd1cde45 (patch)
tree33742ebcb9c64ca8c868aee818ba1e887d4b3a1e
parent11df8c79a70621591b88f769157db278121cd657 (diff)
downloadpoky-fae4ba632bc739cdf7369659f9b3bea2dd1cde45.tar.gz
python3: update 3.9.7 -> 3.10.0
native and target 0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch replaced by native-only 0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch which is more reboust against upstream changes, and keeps target code unmodified. This however necessitated adding 0001-sysconfig.py-use-platlibdir-also-for-purelib.patch to avoid hardcoding 'lib' on target builds as libdir. Drop chunk from 0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch as upstream now uses sysconfig directly inside distutils. Add 0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch and 0001-multiprocessing-disable-a-failing-test.patch to address ptest failures. License-Update: copyright years, case corrections. (From OE-Core rev: 72a75043a946f7db01d3ec04c8889e055f542cca) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/python3-dir.bbclass2
-rw-r--r--meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch6
-rw-r--r--meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch49
-rw-r--r--meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch35
-rw-r--r--meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch34
-rw-r--r--meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch24
-rw-r--r--meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch15
-rw-r--r--meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch30
-rw-r--r--meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch14
-rw-r--r--meta/recipes-devtools/python/python3/makerace.patch25
-rw-r--r--meta/recipes-devtools/python/python3_3.10.0.bb (renamed from meta/recipes-devtools/python/python3_3.9.7.bb)10
11 files changed, 160 insertions, 84 deletions
diff --git a/meta/classes/python3-dir.bbclass b/meta/classes/python3-dir.bbclass
index f51f971fc5..ff03e584d4 100644
--- a/meta/classes/python3-dir.bbclass
+++ b/meta/classes/python3-dir.bbclass
@@ -1,4 +1,4 @@
1PYTHON_BASEVERSION = "3.9" 1PYTHON_BASEVERSION = "3.10"
2PYTHON_ABI = "" 2PYTHON_ABI = ""
3PYTHON_DIR = "python${PYTHON_BASEVERSION}" 3PYTHON_DIR = "python${PYTHON_BASEVERSION}"
4PYTHON_PN = "python3" 4PYTHON_PN = "python3"
diff --git a/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch b/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch
index a94fa0a5a9..46179ba1d1 100644
--- a/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch
+++ b/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch
@@ -1,4 +1,4 @@
1From 9da913bf5f39c6fe737219af7419170574d6fbfb Mon Sep 17 00:00:00 2001 1From cebb772d718a8f798ed5ae311a6e3e61534bea95 Mon Sep 17 00:00:00 2001
2From: Jeremy Puhlman <jpuhlman@mvista.com> 2From: Jeremy Puhlman <jpuhlman@mvista.com>
3Date: Wed, 4 Mar 2020 00:06:42 +0000 3Date: Wed, 4 Mar 2020 00:06:42 +0000
4Subject: [PATCH] Don't search system for headers/libraries 4Subject: [PATCH] Don't search system for headers/libraries
@@ -11,10 +11,10 @@ Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
11 1 file changed, 2 insertions(+), 2 deletions(-) 11 1 file changed, 2 insertions(+), 2 deletions(-)
12 12
13diff --git a/setup.py b/setup.py 13diff --git a/setup.py b/setup.py
14index a0bf9ea..da099bf 100644 14index 95e3e11..32a4d42 100644
15--- a/setup.py 15--- a/setup.py
16+++ b/setup.py 16+++ b/setup.py
17@@ -674,8 +674,8 @@ class PyBuildExt(build_ext): 17@@ -840,8 +840,8 @@ class PyBuildExt(build_ext):
18 add_dir_to_list(self.compiler.include_dirs, 18 add_dir_to_list(self.compiler.include_dirs,
19 sysconfig.get_config_var("INCLUDEDIR")) 19 sysconfig.get_config_var("INCLUDEDIR"))
20 20
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..d6aa9501a7
--- /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,49 @@
1From d8521ee967937184eadc59fff1a30740ad181a98 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Thu, 16 Sep 2021 16:35:37 +0200
4Subject: [PATCH] Lib/pty.py: handle stdin I/O errors same way as master I/O
5 errors
6
7reading stdin can throw the same I/O errors as reading from master fd does,
8e.g. when running under Yocto's test harness:
9======================================================================
10ERROR: test_spawn_doesnt_hang (test.test_pty.PtyTest)
11----------------------------------------------------------------------
12Traceback (most recent call last):
13 File "/usr/lib/python3.10/test/test_pty.py", line 316, in test_spawn_doesnt_hang
14 pty.spawn([sys.executable, '-c', 'print("hi there")'])
15 File "/usr/lib/python3.10/pty.py", line 181, in spawn
16 _copy(master_fd, master_read, stdin_read)
17 File "/usr/lib/python3.10/pty.py", line 157, in _copy
18 data = stdin_read(STDIN_FILENO)
19 File "/usr/lib/python3.10/pty.py", line 132, in _read
20 return os.read(fd, 1024)
21OSError: [Errno 5] Input/output error
22
23So let's treat both channels the same.
24
25Upstream-Status: Submitted [https://github.com/python/cpython/pull/28388]
26Signed-off-by: Alexander Kanavin <alex@linutronix.de>
27---
28 Lib/pty.py | 5 ++++-
29 1 file changed, 4 insertions(+), 1 deletion(-)
30
31diff --git a/Lib/pty.py b/Lib/pty.py
32index 8d8ce40df5..35439c6b96 100644
33--- a/Lib/pty.py
34+++ b/Lib/pty.py
35@@ -154,7 +154,10 @@ def _copy(master_fd, master_read=_read, stdin_read=_read):
36 os.write(STDOUT_FILENO, data)
37
38 if STDIN_FILENO in rfds:
39- data = stdin_read(STDIN_FILENO)
40+ try:
41+ data = stdin_read(STDIN_FILENO)
42+ except OSError:
43+ data = b""
44 if not data:
45 fds.remove(STDIN_FILENO)
46 else:
47--
482.20.1
49
diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch
deleted file mode 100644
index 1490cdbb18..0000000000
--- a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From deeedd1b8799294ab276ab7dbbfdb59c1dacc9a2 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 22 Oct 2020 13:10:34 +0200
4Subject: [PATCH] Lib/sysconfig.py: use libdir values from configuration file
5
6This allows correctly substituting them for target installs using
7native python.
8
9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10---
11 Lib/sysconfig.py | 8 ++++----
12 1 file changed, 4 insertions(+), 4 deletions(-)
13
14diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
15index bf04ac5..ed0462b 100644
16--- a/Lib/sysconfig.py
17+++ b/Lib/sysconfig.py
18@@ -20,10 +20,10 @@ __all__ = [
19
20 _INSTALL_SCHEMES = {
21 'posix_prefix': {
22- 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}',
23- 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}',
24- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
25- 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages',
26+ 'stdlib': '{LIBDEST}',
27+ 'platstdlib': '{LIBDEST}',
28+ 'purelib': '{LIBDEST}/site-packages',
29+ 'platlib': '{LIBDEST}/site-packages',
30 'include':
31 '{installed_base}/include/python{py_version_short}{abiflags}',
32 'platinclude':
33--
342.24.0
35
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..b72c709130
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch
@@ -0,0 +1,34 @@
1From aceaa16e25a8ab6a00f906c340843999635c8e23 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Fri, 10 Sep 2021 12:28:31 +0200
4Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration
5 file
6
7This allows correctly substituting them for target installs using
8native python.
9
10Upstream-Status: Inappropriate [oe-core cross builds]
11Signed-off-by: Alexander Kanavin <alex@linutronix.de>
12---
13 Lib/sysconfig.py | 5 +++++
14 1 file changed, 5 insertions(+)
15
16diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
17index 95b48f6..84f6427 100644
18--- a/Lib/sysconfig.py
19+++ b/Lib/sysconfig.py
20@@ -613,6 +613,11 @@ def get_config_vars(*args):
21 _init_non_posix(_CONFIG_VARS)
22 if os.name == 'posix':
23 _init_posix(_CONFIG_VARS)
24+ _CONFIG_VARS['installed_base'] = _CONFIG_VARS['prefix']
25+ _CONFIG_VARS['base'] = _CONFIG_VARS['prefix']
26+ _CONFIG_VARS['installed_platbase'] = _CONFIG_VARS['prefix']
27+ _CONFIG_VARS['platbase'] = _CONFIG_VARS['prefix']
28+ _CONFIG_VARS['platlibdir'] = _CONFIG_VARS['PLATLIBDIR']
29 # For backward compatibility, see issue19555
30 SO = _CONFIG_VARS.get('EXT_SUFFIX')
31 if SO is not None:
32--
332.20.1
34
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
index b982691b36..b323ed4dd0 100644
--- 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
@@ -1,4 +1,4 @@
1From e65bfe22c858872b08366aff49119d4145a77f40 Mon Sep 17 00:00:00 2001 1From 3a98c2eab187289dc8c55e36738c2c0f4216d906 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 31 Jan 2019 16:46:30 +0100 3Date: Thu, 31 Jan 2019 16:46:30 +0100
4Subject: [PATCH] distutils/sysconfig: append 4Subject: [PATCH] distutils/sysconfig: append
@@ -10,28 +10,14 @@ Upstream-Status: Inappropriate [oe-core specific]
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11 11
12--- 12---
13 Lib/distutils/sysconfig.py | 2 ++ 13 Lib/sysconfig.py | 2 ++
14 Lib/sysconfig.py | 2 ++ 14 1 file changed, 2 insertions(+)
15 2 files changed, 4 insertions(+)
16 15
17diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
18index b51629e..2df348c 100644
19--- a/Lib/distutils/sysconfig.py
20+++ b/Lib/distutils/sysconfig.py
21@@ -438,6 +438,8 @@ def _init_posix():
22 platform=sys.platform,
23 multiarch=getattr(sys.implementation, '_multiarch', ''),
24 ))
25+ if 'STAGING_LIBDIR' in os.environ:
26+ sys.path.append(os.environ['STAGING_LIBDIR']+'/python-sysconfigdata')
27 _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
28 build_time_vars = _temp.build_time_vars
29 global _config_vars
30diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py 16diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
31index b2d790b..405273c 100644 17index a78c0b1..f5c5efe 100644
32--- a/Lib/sysconfig.py 18--- a/Lib/sysconfig.py
33+++ b/Lib/sysconfig.py 19+++ b/Lib/sysconfig.py
34@@ -419,6 +419,8 @@ def _init_posix(vars): 20@@ -474,6 +474,8 @@ def _init_posix(vars):
35 """Initialize the module as appropriate for POSIX systems.""" 21 """Initialize the module as appropriate for POSIX systems."""
36 # _sysconfigdata is generated at build time, see _generate_posix_vars() 22 # _sysconfigdata is generated at build time, see _generate_posix_vars()
37 name = _get_sysconfigdata_name() 23 name = _get_sysconfigdata_name()
diff --git a/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch b/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch
index ea0af02e72..374433c68e 100644
--- a/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch
+++ b/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch
@@ -1,4 +1,4 @@
1From 7019ba184b828ed7253750cf409fc5760ef90a54 Mon Sep 17 00:00:00 2001 1From bad7e6a625436402a01d03021fb9ccd58bc9930f Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 9 Jan 2020 17:44:05 +0100 3Date: Thu, 9 Jan 2020 17:44:05 +0100
4Subject: [PATCH] setup.py: pass missing libraries to Extension for 4Subject: [PATCH] setup.py: pass missing libraries to Extension for
@@ -50,20 +50,21 @@ Upstream-Status: Pending
50 50
51Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 51Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
52Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 52Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
53
53--- 54---
54 setup.py | 2 +- 55 setup.py | 2 +-
55 1 file changed, 1 insertion(+), 1 deletion(-) 56 1 file changed, 1 insertion(+), 1 deletion(-)
56 57
57diff --git a/setup.py b/setup.py 58diff --git a/setup.py b/setup.py
58index ec3f2a4..b0f1541 100644 59index d92face..f42bcbb 100644
59--- a/setup.py 60--- a/setup.py
60+++ b/setup.py 61+++ b/setup.py
61@@ -1671,7 +1671,7 @@ class PyBuildExt(build_ext): 62@@ -1836,7 +1836,7 @@ class PyBuildExt(build_ext):
62 libraries=libs, 63 if (sysconfig.get_config_var('HAVE_SEM_OPEN') and not
63 include_dirs=["Modules/_multiprocessing"])) 64 sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')):
64 65 multiprocessing_srcs.append('_multiprocessing/semaphore.c')
65- self.add(Extension('_multiprocessing', multiprocessing_srcs, 66- self.add(Extension('_multiprocessing', multiprocessing_srcs,
66+ self.add(Extension('_multiprocessing', multiprocessing_srcs, libraries=['pthread'], 67+ self.add(Extension('_multiprocessing', multiprocessing_srcs, libraries=['pthread'],
67 include_dirs=["Modules/_multiprocessing"])) 68 include_dirs=["Modules/_multiprocessing"]))
68 69
69 def detect_uuid(self): 70 if (not MS_WINDOWS and
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..2b5a7d308c
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch
@@ -0,0 +1,30 @@
1From 93346d1a2f5d4f7085391bc7c1230d85ebe00606 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Sun, 12 Sep 2021 21:44:36 +0200
4Subject: [PATCH] sysconfig.py: use platlibdir also for purelib
5
6This is needed in multilib configurations where hardcoding 'lib'
7is not correct.
8
9Upstream-Status: Inappropriate [oe-core specific]
10Signed-off-by: Alexander Kanavin <alex@linutronix.de>
11---
12 Lib/sysconfig.py | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
16index b70d392..c418acd 100644
17--- a/Lib/sysconfig.py
18+++ b/Lib/sysconfig.py
19@@ -27,7 +27,7 @@ _INSTALL_SCHEMES = {
20 'posix_prefix': {
21 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}',
22 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}',
23- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
24+ 'purelib': '{base}/{platlibdir}/python{py_version_short}/site-packages',
25 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages',
26 'include':
27 '{installed_base}/include/python{py_version_short}{abiflags}',
28--
292.20.1
30
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
index 5a39cf8933..cc64e3ecf7 100644
--- 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
@@ -1,7 +1,7 @@
1From c52fa7948ef109db1132fdc1aee0b68f8d767b4e Mon Sep 17 00:00:00 2001 1From f6411021856bafedd784748ec33494151e783b51 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 14 May 2013 15:00:26 -0700 3Date: Tue, 14 May 2013 15:00:26 -0700
4Subject: [PATCH 1/2] python3: Add target and native recipes 4Subject: [PATCH] python3: Add target and native recipes
5 5
6Upstream-Status: Inappropriate [embedded specific] 6Upstream-Status: Inappropriate [embedded specific]
7 7
@@ -17,10 +17,10 @@ Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
17 1 file changed, 11 insertions(+), 3 deletions(-) 17 1 file changed, 11 insertions(+), 3 deletions(-)
18 18
19diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py 19diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
20index 4774e12..ccf7d58 100644 20index 3414a76..361d3a1 100644
21--- a/Lib/distutils/sysconfig.py 21--- a/Lib/distutils/sysconfig.py
22+++ b/Lib/distutils/sysconfig.py 22+++ b/Lib/distutils/sysconfig.py
23@@ -95,7 +95,9 @@ def get_python_inc(plat_specific=0, prefix=None): 23@@ -277,7 +277,9 @@ def get_python_inc(plat_specific=0, prefix=None):
24 If 'prefix' is supplied, use it instead of sys.base_prefix or 24 If 'prefix' is supplied, use it instead of sys.base_prefix or
25 sys.base_exec_prefix -- i.e., ignore 'plat_specific'. 25 sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
26 """ 26 """
@@ -31,7 +31,7 @@ index 4774e12..ccf7d58 100644
31 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX 31 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
32 if os.name == "posix": 32 if os.name == "posix":
33 if python_build: 33 if python_build:
34@@ -138,7 +140,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): 34@@ -320,7 +322,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
35 If 'prefix' is supplied, use it instead of sys.base_prefix or 35 If 'prefix' is supplied, use it instead of sys.base_prefix or
36 sys.base_exec_prefix -- i.e., ignore 'plat_specific'. 36 sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
37 """ 37 """
@@ -46,7 +46,7 @@ index 4774e12..ccf7d58 100644
46 if standard_lib: 46 if standard_lib:
47 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX 47 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
48 else: 48 else:
49@@ -152,7 +160,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): 49@@ -334,7 +342,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
50 else: 50 else:
51 # Pure Python 51 # Pure Python
52 libdir = "lib" 52 libdir = "lib"
@@ -56,5 +56,5 @@ index 4774e12..ccf7d58 100644
56 if standard_lib: 56 if standard_lib:
57 return libpython 57 return libpython
58-- 58--
592.24.0 592.20.1
60 60
diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch
index 96744cb557..b150c1cb38 100644
--- a/meta/recipes-devtools/python/python3/makerace.patch
+++ b/meta/recipes-devtools/python/python3/makerace.patch
@@ -1,3 +1,8 @@
1From 8b8583fb4f2bb3421e31ef06d17c04deec431c7e Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Tue, 13 Jul 2021 23:19:29 +0100
4Subject: [PATCH] python3: Fix make race
5
1libainstall installs python-config.py but the .pyc cache files are generated 6libainstall installs python-config.py but the .pyc cache files are generated
2by the libinstall target. This means some builds may not generate the pyc files 7by the libinstall target. This means some builds may not generate the pyc files
3for python-config.py depending on the order things happen in. This means builds 8for python-config.py depending on the order things happen in. This means builds
@@ -8,14 +13,18 @@ Add a dependency to avoid the race.
8Upstream-Status: Pending 13Upstream-Status: Pending
9Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 14Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
10 15
11Index: Python-3.9.6/Makefile.pre.in 16---
12=================================================================== 17 Makefile.pre.in | 2 +-
13--- Python-3.9.6.orig/Makefile.pre.in 18 1 file changed, 1 insertion(+), 1 deletion(-)
14+++ Python-3.9.6/Makefile.pre.in 19
15@@ -1486,7 +1486,7 @@ LIBSUBDIRS= tkinter tkinter/test tkinter 20diff --git a/Makefile.pre.in b/Makefile.pre.in
16 venv venv/scripts venv/scripts/common venv/scripts/posix \ 21index 69d47a2..c471b60 100644
17 curses pydoc_data \ 22--- a/Makefile.pre.in
18 zoneinfo 23+++ b/Makefile.pre.in
24@@ -1528,7 +1528,7 @@ TESTSUBDIRS= ctypes/test \
25 unittest/test unittest/test/testmock
26
27 TEST_MODULES=@TEST_MODULES@
19-libinstall: build_all $(srcdir)/Modules/xxmodule.c 28-libinstall: build_all $(srcdir)/Modules/xxmodule.c
20+libinstall: build_all $(srcdir)/Modules/xxmodule.c libainstall 29+libinstall: build_all $(srcdir)/Modules/xxmodule.c libainstall
21 @for i in $(SCRIPTDIR) $(LIBDEST); \ 30 @for i in $(SCRIPTDIR) $(LIBDEST); \
diff --git a/meta/recipes-devtools/python/python3_3.9.7.bb b/meta/recipes-devtools/python/python3_3.10.0.bb
index 772dcb8d9d..2e850710b6 100644
--- a/meta/recipes-devtools/python/python3_3.9.7.bb
+++ b/meta/recipes-devtools/python/python3_3.10.0.bb
@@ -4,7 +4,7 @@ DESCRIPTION = "Python is a programming language that lets you work more quickly
4LICENSE = "PSFv2" 4LICENSE = "PSFv2"
5SECTION = "devel/python" 5SECTION = "devel/python"
6 6
7LIC_FILES_CHKSUM = "file://LICENSE;md5=c22d2438294c784731bf9dd224a467b7" 7LIC_FILES_CHKSUM = "file://LICENSE;md5=3dd7bed622743ef9b77169b3736f7990"
8 8
9SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ 9SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
10 file://run-ptest \ 10 file://run-ptest \
@@ -28,18 +28,20 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
28 file://0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \ 28 file://0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \
29 file://0001-Makefile-do-not-compile-.pyc-in-parallel.patch \ 29 file://0001-Makefile-do-not-compile-.pyc-in-parallel.patch \
30 file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \ 30 file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \
31 file://0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch \
32 file://0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch \ 31 file://0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch \
33 file://0001-test_ctypes.test_find-skip-without-tools-sdk.patch \ 32 file://0001-test_ctypes.test_find-skip-without-tools-sdk.patch \
34 file://makerace.patch \ 33 file://makerace.patch \
34 file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \
35 file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \
35 " 36 "
36 37
37SRC_URI:append:class-native = " \ 38SRC_URI:append:class-native = " \
39 file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \
38 file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \ 40 file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \
39 file://12-distutils-prefix-is-inside-staging-area.patch \ 41 file://12-distutils-prefix-is-inside-staging-area.patch \
40 file://0001-Don-t-search-system-for-headers-libraries.patch \ 42 file://0001-Don-t-search-system-for-headers-libraries.patch \
41 " 43 "
42SRC_URI[sha256sum] = "f8145616e68c00041d1a6399b76387390388f8359581abc24432bb969b5e3c57" 44SRC_URI[sha256sum] = "5a99f8e7a6a11a7b98b4e75e0d1303d3832cada5534068f69c7b6222a7b1b002"
43 45
44# exclude pre-releases for both python 2.x and 3.x 46# exclude pre-releases for both python 2.x and 3.x
45UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" 47UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
@@ -55,7 +57,7 @@ CVE_CHECK_WHITELIST += "CVE-2019-18348"
55# This is windows only issue. 57# This is windows only issue.
56CVE_CHECK_WHITELIST += "CVE-2020-15523" 58CVE_CHECK_WHITELIST += "CVE-2020-15523"
57 59
58PYTHON_MAJMIN = "3.9" 60PYTHON_MAJMIN = "3.10"
59 61
60S = "${WORKDIR}/Python-${PV}" 62S = "${WORKDIR}/Python-${PV}"
61 63