summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-10-28 22:05:58 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-30 13:22:49 +0000
commit354f96bf78b355aa396b8340abfae2ca38dcdea1 (patch)
treef1277b296c5f351ac34b98528884e64f74159167 /meta
parentbb5bfc3ac7a991f608036d2db1369a06dd24a0fa (diff)
downloadpoky-354f96bf78b355aa396b8340abfae2ca38dcdea1.tar.gz
python: update 3.8.5 -> 3.9.0
Drop 0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch, 0001-configure.ac-fix-LIBPL.patch and 0001-python3-Do-not-hardcode-lib-for-distutils.patch as they are all replaced by the new --platlibdir option to ./configure Rename 0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch to 0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch and describe the changes better. License-Update: documentation now dual license under PSF & BSD (not relevant for the recipe. (From OE-Core rev: 7347556b18b45c5f9afc2cade565a75c95876914) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/python3-dir.bbclass2
-rw-r--r--meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch214
-rw-r--r--meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch4
-rw-r--r--meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch (renamed from meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch)22
-rw-r--r--meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch12
-rw-r--r--meta/recipes-devtools/python/python3/0001-configure.ac-fix-LIBPL.patch35
-rw-r--r--meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch2
-rw-r--r--meta/recipes-devtools/python/python3/0001-python3-Do-not-hardcode-lib-for-distutils.patch43
-rw-r--r--meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch26
-rw-r--r--meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch2
-rw-r--r--meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch38
-rw-r--r--meta/recipes-devtools/python/python3/python-config.patch8
-rw-r--r--meta/recipes-devtools/python/python3_3.9.0.bb (renamed from meta/recipes-devtools/python/python3_3.8.5.bb)24
13 files changed, 74 insertions, 358 deletions
diff --git a/meta/classes/python3-dir.bbclass b/meta/classes/python3-dir.bbclass
index 036d7140d9..f51f971fc5 100644
--- a/meta/classes/python3-dir.bbclass
+++ b/meta/classes/python3-dir.bbclass
@@ -1,4 +1,4 @@
1PYTHON_BASEVERSION = "3.8" 1PYTHON_BASEVERSION = "3.9"
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-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 112c979441..0000000000
--- a/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch
+++ /dev/null
@@ -1,214 +0,0 @@
1From a078b6ff1492e848ad1055764fb9a414abaf3e12 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 5 Feb 2019 15:52:02 +0100
4Subject: [PATCH] Do not hardcode "lib" as location for modules, site-packages
5 and lib-dynload
6
7Upstream-Status: Inappropriate [oe-core specific]
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9
10---
11 Include/pythonrun.h | 2 ++
12 Lib/site.py | 4 ++--
13 Makefile.pre.in | 5 +++--
14 Modules/getpath.c | 22 ++++++++++++++--------
15 Python/getplatform.c | 10 ++++++++++
16 Python/sysmodule.c | 2 ++
17 6 files changed, 33 insertions(+), 12 deletions(-)
18
19diff --git a/Include/pythonrun.h b/Include/pythonrun.h
20index 46091e0..61b2e15 100644
21--- a/Include/pythonrun.h
22+++ b/Include/pythonrun.h
23@@ -7,6 +7,8 @@
24 extern "C" {
25 #endif
26
27+PyAPI_FUNC(const char *) Py_GetLib(void);
28+
29 #ifndef Py_LIMITED_API
30 PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
31 PyAPI_FUNC(int) PyRun_AnyFileExFlags(
32diff --git a/Lib/site.py b/Lib/site.py
33index a065ab0..1d720ef 100644
34--- a/Lib/site.py
35+++ b/Lib/site.py
36@@ -335,12 +335,12 @@ def getsitepackages(prefixes=None):
37 seen.add(prefix)
38
39 if os.sep == '/':
40- sitepackages.append(os.path.join(prefix, "lib",
41+ sitepackages.append(os.path.join(prefix, sys.lib,
42 "python%d.%d" % sys.version_info[:2],
43 "site-packages"))
44 else:
45 sitepackages.append(prefix)
46- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
47+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
48 return sitepackages
49
50 def addsitepackages(known_paths, prefixes=None):
51diff --git a/Makefile.pre.in b/Makefile.pre.in
52index 65665df..be49140 100644
53--- a/Makefile.pre.in
54+++ b/Makefile.pre.in
55@@ -143,7 +143,7 @@ LIBDIR= @libdir@
56 MANDIR= @mandir@
57 INCLUDEDIR= @includedir@
58 CONFINCLUDEDIR= $(exec_prefix)/include
59-SCRIPTDIR= $(prefix)/lib
60+SCRIPTDIR= @libdir@
61 ABIFLAGS= @ABIFLAGS@
62
63 # Detailed destination directories
64@@ -753,6 +753,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
65 -DEXEC_PREFIX='"$(exec_prefix)"' \
66 -DVERSION='"$(VERSION)"' \
67 -DVPATH='"$(VPATH)"' \
68+ -DLIB='"$(LIB)"' \
69 -o $@ $(srcdir)/Modules/getpath.c
70
71 Programs/python.o: $(srcdir)/Programs/python.c
72@@ -868,7 +869,7 @@ regen-symbol: $(srcdir)/Include/graminit.h
73 Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o Parser/parsetok.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
74
75 Python/getplatform.o: $(srcdir)/Python/getplatform.c
76- $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
77+ $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
78
79 Python/importdl.o: $(srcdir)/Python/importdl.c
80 $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
81diff --git a/Modules/getpath.c b/Modules/getpath.c
82index b727f66..c003e46 100644
83--- a/Modules/getpath.c
84+++ b/Modules/getpath.c
85@@ -128,6 +128,7 @@ typedef struct {
86 wchar_t *exec_prefix; /* EXEC_PREFIX macro */
87
88 wchar_t *lib_python; /* "lib/pythonX.Y" */
89+ wchar_t *multilib_python; /* "lib[suffix]/pythonX.Y" */
90
91 int prefix_found; /* found platform independent libraries? */
92 int exec_prefix_found; /* found the platform dependent libraries? */
93@@ -386,7 +387,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
94 if (delim) {
95 *delim = L'\0';
96 }
97- status = joinpath(prefix, calculate->lib_python, prefix_len);
98+ status = joinpath(prefix, calculate->multilib_python, prefix_len);
99 if (_PyStatus_EXCEPTION(status)) {
100 return status;
101 }
102@@ -444,7 +445,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
103 do {
104 /* Path: <argv0_path or substring> / <lib_python> / LANDMARK */
105 size_t n = wcslen(prefix);
106- status = joinpath(prefix, calculate->lib_python, prefix_len);
107+ status = joinpath(prefix, calculate->multilib_python, prefix_len);
108 if (_PyStatus_EXCEPTION(status)) {
109 return status;
110 }
111@@ -467,7 +468,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
112 if (safe_wcscpy(prefix, calculate->prefix, prefix_len) < 0) {
113 return PATHLEN_ERR();
114 }
115- status = joinpath(prefix, calculate->lib_python, prefix_len);
116+ status = joinpath(prefix, calculate->multilib_python, prefix_len);
117 if (_PyStatus_EXCEPTION(status)) {
118 return status;
119 }
120@@ -510,7 +511,7 @@ calculate_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
121 if (safe_wcscpy(prefix, calculate->prefix, prefix_len) < 0) {
122 return PATHLEN_ERR();
123 }
124- status = joinpath(prefix, calculate->lib_python, prefix_len);
125+ status = joinpath(prefix, calculate->multilib_python, prefix_len);
126 if (_PyStatus_EXCEPTION(status)) {
127 return status;
128 }
129@@ -635,7 +636,7 @@ search_for_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
130 return PATHLEN_ERR();
131 }
132 }
133- status = joinpath(exec_prefix, calculate->lib_python, exec_prefix_len);
134+ status = joinpath(exec_prefix, calculate->multilib_python, exec_prefix_len);
135 if (_PyStatus_EXCEPTION(status)) {
136 return status;
137 }
138@@ -667,7 +668,7 @@ search_for_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
139 do {
140 /* Path: <argv0_path or substring> / <lib_python> / "lib-dynload" */
141 size_t n = wcslen(exec_prefix);
142- status = joinpath(exec_prefix, calculate->lib_python, exec_prefix_len);
143+ status = joinpath(exec_prefix, calculate->multilib_python, exec_prefix_len);
144 if (_PyStatus_EXCEPTION(status)) {
145 return status;
146 }
147@@ -689,7 +690,7 @@ search_for_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
148 if (safe_wcscpy(exec_prefix, calculate->exec_prefix, exec_prefix_len) < 0) {
149 return PATHLEN_ERR();
150 }
151- status = joinpath(exec_prefix, calculate->lib_python, exec_prefix_len);
152+ status = joinpath(exec_prefix, calculate->multilib_python, exec_prefix_len);
153 if (_PyStatus_EXCEPTION(status)) {
154 return status;
155 }
156@@ -928,7 +929,7 @@ calculate_argv0_path(PyCalculatePath *calculate, const wchar_t *program_full_pat
157 return PATHLEN_ERR();
158 }
159 reduce(argv0_path);
160- status = joinpath(argv0_path, calculate->lib_python, argv0_path_len);
161+ status = joinpath(argv0_path, calculate->multilib_python, argv0_path_len);
162 if (_PyStatus_EXCEPTION(status)) {
163 PyMem_RawFree(wbuf);
164 return status;
165@@ -1201,6 +1202,10 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config)
166 if (!calculate->lib_python) {
167 return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
168 }
169+ calculate->multilib_python = Py_DecodeLocale(LIB "/python" VERSION, &len);
170+ if (!calculate->multilib_python) {
171+ return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
172+ }
173
174 calculate->warnings = config->pathconfig_warnings;
175 calculate->pythonpath_env = config->pythonpath_env;
176@@ -1216,6 +1221,7 @@ calculate_free(PyCalculatePath *calculate)
177 PyMem_RawFree(calculate->prefix);
178 PyMem_RawFree(calculate->exec_prefix);
179 PyMem_RawFree(calculate->lib_python);
180+ PyMem_RawFree(calculate->multilib_python);
181 PyMem_RawFree(calculate->path_env);
182 }
183
184diff --git a/Python/getplatform.c b/Python/getplatform.c
185index 81a0f7a..d55396b 100644
186--- a/Python/getplatform.c
187+++ b/Python/getplatform.c
188@@ -10,3 +10,13 @@ Py_GetPlatform(void)
189 {
190 return PLATFORM;
191 }
192+
193+#ifndef LIB
194+#define LIB "lib"
195+#endif
196+
197+const char *
198+Py_GetLib(void)
199+{
200+ return LIB;
201+}
202diff --git a/Python/sysmodule.c b/Python/sysmodule.c
203index 5b0fb81..0dce754 100644
204--- a/Python/sysmodule.c
205+++ b/Python/sysmodule.c
206@@ -2668,6 +2668,8 @@ _PySys_InitCore(_PyRuntimeState *runtime, PyInterpreterState *interp,
207 PyUnicode_FromString(Py_GetCopyright()));
208 SET_SYS_FROM_STRING("platform",
209 PyUnicode_FromString(Py_GetPlatform()));
210+ SET_SYS_FROM_STRING("lib",
211+ PyUnicode_FromString(Py_GetLib()));
212 SET_SYS_FROM_STRING("maxsize",
213 PyLong_FromSsize_t(PY_SSIZE_T_MAX));
214 SET_SYS_FROM_STRING("float_info",
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 3e471b9a49..a94fa0a5a9 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 b880e78bf4a1852e260188e6df3ec6034403d2fc Mon Sep 17 00:00:00 2001 1From 9da913bf5f39c6fe737219af7419170574d6fbfb 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,7 +11,7 @@ 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 7208cd0..c0bd0ad 100644 14index a0bf9ea..da099bf 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@@ -674,8 +674,8 @@ class PyBuildExt(build_ext):
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-use-libdir-values-from-configuratio.patch
index b97583682a..1490cdbb18 100644
--- 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-use-libdir-values-from-configuratio.patch
@@ -1,27 +1,28 @@
1From a21f4f8fa5e5c0601898740b4ac08ec84f41e190 Mon Sep 17 00:00:00 2001 1From deeedd1b8799294ab276ab7dbbfdb59c1dacc9a2 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 18 Apr 2019 17:11:06 +0200 3Date: Thu, 22 Oct 2020 13:10:34 +0200
4Subject: [PATCH] Lib/sysconfig.py: fix another place where 'lib' is hardcoded 4Subject: [PATCH] Lib/sysconfig.py: use libdir values from configuration file
5 as the library path 5
6This allows correctly substituting them for target installs using
7native python.
6 8
7Upstream-Status: Inappropriate [oe-core specific]
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9--- 10---
10 Lib/sysconfig.py | 8 ++++---- 11 Lib/sysconfig.py | 8 ++++----
11 1 file changed, 4 insertions(+), 4 deletions(-) 12 1 file changed, 4 insertions(+), 4 deletions(-)
12 13
13diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py 14diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
14index d15cec8..87fa5e6 100644 15index bf04ac5..ed0462b 100644
15--- a/Lib/sysconfig.py 16--- a/Lib/sysconfig.py
16+++ b/Lib/sysconfig.py 17+++ b/Lib/sysconfig.py
17@@ -20,10 +20,10 @@ __all__ = [ 18@@ -20,10 +20,10 @@ __all__ = [
18 19
19 _INSTALL_SCHEMES = { 20 _INSTALL_SCHEMES = {
20 'posix_prefix': { 21 'posix_prefix': {
21- 'stdlib': '{installed_base}/lib/python{py_version_short}', 22- 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}',
22- 'platstdlib': '{platbase}/lib/python{py_version_short}', 23- 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}',
23- 'purelib': '{base}/lib/python{py_version_short}/site-packages', 24- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
24- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', 25- 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages',
25+ 'stdlib': '{LIBDEST}', 26+ 'stdlib': '{LIBDEST}',
26+ 'platstdlib': '{LIBDEST}', 27+ 'platstdlib': '{LIBDEST}',
27+ 'purelib': '{LIBDEST}/site-packages', 28+ 'purelib': '{LIBDEST}/site-packages',
@@ -29,3 +30,6 @@ index d15cec8..87fa5e6 100644
29 'include': 30 'include':
30 '{installed_base}/include/python{py_version_short}{abiflags}', 31 '{installed_base}/include/python{py_version_short}{abiflags}',
31 'platinclude': 32 'platinclude':
33--
342.24.0
35
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
index 957839bf3e..793385de91 100644
--- 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
@@ -1,19 +1,20 @@
1From 6c8ea7c1dacd42f3ba00440231ec0e6b1a38300d Mon Sep 17 00:00:00 2001 1From 9f63e83b1cec872917647b11155edaffe399d103 Mon Sep 17 00:00:00 2001
2From: Inada Naoki <songofacandy@gmail.com> 2From: Inada Naoki <songofacandy@gmail.com>
3Date: Sat, 14 Jul 2018 00:46:11 +0900 3Date: Sat, 14 Jul 2018 00:46:11 +0900
4Subject: [PATCH] Use FLAG_REF always for interned strings 4Subject: [PATCH] Use FLAG_REF always for interned strings
5 5
6Upstream-Status: Submitted [https://github.com/python/cpython/pull/8226] 6Upstream-Status: Submitted [https://github.com/python/cpython/pull/8226]
7Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> 7Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
8
8--- 9---
9 Python/marshal.c | 9 +++++++-- 10 Python/marshal.c | 9 +++++++--
10 1 file changed, 7 insertions(+), 2 deletions(-) 11 1 file changed, 7 insertions(+), 2 deletions(-)
11 12
12diff --git a/Python/marshal.c b/Python/marshal.c 13diff --git a/Python/marshal.c b/Python/marshal.c
13index 6d06266c6a..51db2e3b2e 100644 14index c4538bd..2437160 100644
14--- a/Python/marshal.c 15--- a/Python/marshal.c
15+++ b/Python/marshal.c 16+++ b/Python/marshal.c
16@@ -275,9 +275,14 @@ w_ref(PyObject *v, char *flag, WFILE *p) 17@@ -298,9 +298,14 @@ w_ref(PyObject *v, char *flag, WFILE *p)
17 if (p->version < 3 || p->hashtable == NULL) 18 if (p->version < 3 || p->hashtable == NULL)
18 return 0; /* not writing object references */ 19 return 0; /* not writing object references */
19 20
@@ -28,8 +29,5 @@ index 6d06266c6a..51db2e3b2e 100644
28 return 0; 29 return 0;
29+ } 30+ }
30 31
31 entry = _Py_HASHTABLE_GET_ENTRY(p->hashtable, v); 32 entry = _Py_hashtable_get_entry(p->hashtable, v);
32 if (entry != NULL) { 33 if (entry != NULL) {
33--
342.21.0
35
diff --git a/meta/recipes-devtools/python/python3/0001-configure.ac-fix-LIBPL.patch b/meta/recipes-devtools/python/python3/0001-configure.ac-fix-LIBPL.patch
deleted file mode 100644
index 123ce3a2dc..0000000000
--- a/meta/recipes-devtools/python/python3/0001-configure.ac-fix-LIBPL.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From acce3d441e7eadadd2d3ce38654155dc43f1f607 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Fri, 7 Feb 2020 09:36:25 +0800
4Subject: [PATCH] configure.ac: fix LIBPL
5
6Use LIBDIR rather than prefix/lib, so that it would work when lib64.
7
8Upstream-Status: Inappropriate [oe-core specific]
9
10Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
11Signed-off-by: Li Zhou <li.zhou@windriver.c>
12Signed-off-by: Changqing Li <changqing.li@windriver.com>
13---
14 configure.ac | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/configure.ac b/configure.ac
18index ce04258..915f475 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -4532,9 +4532,9 @@ fi
22 dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
23 AC_SUBST(PY_ENABLE_SHARED)
24 if test x$PLATFORM_TRIPLET = x; then
25- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
26+ LIBPL='$(LIBDIR)'"/python${VERSION}/config-${LDVERSION}"
27 else
28- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
29+ LIBPL='$(LIBDIR)'"/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
30 fi
31 AC_SUBST(LIBPL)
32
33--
342.7.4
35
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 2b68c0acc2..b982691b36 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 bc59d49efff41051034d7fbf5d0c8505e4c3134b Mon Sep 17 00:00:00 2001 1From e65bfe22c858872b08366aff49119d4145a77f40 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
diff --git a/meta/recipes-devtools/python/python3/0001-python3-Do-not-hardcode-lib-for-distutils.patch b/meta/recipes-devtools/python/python3/0001-python3-Do-not-hardcode-lib-for-distutils.patch
deleted file mode 100644
index fe031b9983..0000000000
--- a/meta/recipes-devtools/python/python3/0001-python3-Do-not-hardcode-lib-for-distutils.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From bb711b53f10d32a90a27ccf4b0dc51e4a701d862 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Fri, 7 Feb 2020 09:42:09 +0800
4Subject: [PATCH] python3: Do not hardcode "lib" for distutils
5
6Get the sys.lib from python3 itself and do not use
7hardcoded value of 'lib' for distutils.
8
9Upstream-Status: Inappropriate [oe-core specific]
10
11Signed-off-by: Li Zhou <li.zhou@windriver.com>
12Signed-off-by: Changqing Li <changqing.li@windriver.com>
13---
14 Lib/distutils/command/install.py | 6 ++++--
15 1 file changed, 4 insertions(+), 2 deletions(-)
16
17diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
18index c625c95..8e32f54 100644
19--- a/Lib/distutils/command/install.py
20+++ b/Lib/distutils/command/install.py
21@@ -19,6 +19,8 @@ from site import USER_BASE
22 from site import USER_SITE
23 HAS_USER_SITE = True
24
25+libname = sys.lib
26+
27 WINDOWS_SCHEME = {
28 'purelib': '$base/Lib/site-packages',
29 'platlib': '$base/Lib/site-packages',
30@@ -29,8 +31,8 @@ WINDOWS_SCHEME = {
31
32 INSTALL_SCHEMES = {
33 'unix_prefix': {
34- 'purelib': '$base/lib/python$py_version_short/site-packages',
35- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
36+ 'purelib': '$base/' + libname + '/python$py_version_short/site-packages',
37+ 'platlib': '$platbase/' + libname + '/python$py_version_short/site-packages',
38 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
39 'scripts': '$base/bin',
40 'data' : '$base',
41--
422.7.4
43
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 fb10ca94b3..bfddc1ad52 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 @@
1From 994783da5c21cab81b6589ed2d4275e665a946f9 Mon Sep 17 00:00:00 2001 1From 5f9eea2c4f8716830f6c8855a3e10872119fae32 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com> 2From: Changqing Li <changqing.li@windriver.com>
3Date: Mon, 22 Oct 2018 15:19:51 +0800 3Date: Mon, 22 Oct 2018 15:19:51 +0800
4Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler 4Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler
@@ -27,7 +27,7 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
27 1 file changed, 10 insertions(+), 9 deletions(-) 27 1 file changed, 10 insertions(+), 9 deletions(-)
28 28
29diff --git a/configure.ac b/configure.ac 29diff --git a/configure.ac b/configure.ac
30index a189d42..0f85486 100644 30index d60f052..e491e24 100644
31--- a/configure.ac 31--- a/configure.ac
32+++ b/configure.ac 32+++ b/configure.ac
33@@ -54,6 +54,7 @@ AC_CONFIG_HEADER(pyconfig.h) 33@@ -54,6 +54,7 @@ AC_CONFIG_HEADER(pyconfig.h)
@@ -38,7 +38,7 @@ index a189d42..0f85486 100644
38 38
39 # pybuilddir.txt will be created by --generate-posix-vars in the Makefile 39 # pybuilddir.txt will be created by --generate-posix-vars in the Makefile
40 rm -f pybuilddir.txt 40 rm -f pybuilddir.txt
41@@ -671,7 +672,7 @@ AC_MSG_RESULT($with_cxx_main) 41@@ -689,7 +690,7 @@ AC_MSG_RESULT($with_cxx_main)
42 preset_cxx="$CXX" 42 preset_cxx="$CXX"
43 if test -z "$CXX" 43 if test -z "$CXX"
44 then 44 then
@@ -47,7 +47,7 @@ index a189d42..0f85486 100644
47 gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;; 47 gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
48 cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;; 48 cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
49 clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;; 49 clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;;
50@@ -957,7 +958,7 @@ rmdir CaseSensitiveTestDir 50@@ -975,7 +976,7 @@ rmdir CaseSensitiveTestDir
51 51
52 case $ac_sys_system in 52 case $ac_sys_system in
53 hp*|HP*) 53 hp*|HP*)
@@ -56,7 +56,7 @@ index a189d42..0f85486 100644
56 cc|*/cc) CC="$CC -Ae";; 56 cc|*/cc) CC="$CC -Ae";;
57 esac;; 57 esac;;
58 esac 58 esac
59@@ -1335,7 +1336,7 @@ else 59@@ -1366,7 +1367,7 @@ else
60 fi], 60 fi],
61 [AC_MSG_RESULT(no)]) 61 [AC_MSG_RESULT(no)])
62 if test "$Py_LTO" = 'true' ; then 62 if test "$Py_LTO" = 'true' ; then
@@ -65,7 +65,7 @@ index a189d42..0f85486 100644
65 *clang*) 65 *clang*)
66 AC_SUBST(LLVM_AR) 66 AC_SUBST(LLVM_AR)
67 AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path}) 67 AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
68@@ -1425,7 +1426,7 @@ then 68@@ -1456,7 +1457,7 @@ then
69 fi 69 fi
70 fi 70 fi
71 LLVM_PROF_ERR=no 71 LLVM_PROF_ERR=no
@@ -74,7 +74,7 @@ index a189d42..0f85486 100644
74 *clang*) 74 *clang*)
75 # Any changes made here should be reflected in the GCC+Darwin case below 75 # Any changes made here should be reflected in the GCC+Darwin case below
76 PGO_PROF_GEN_FLAG="-fprofile-instr-generate" 76 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
77@@ -1486,7 +1487,7 @@ esac 77@@ -1517,7 +1518,7 @@ esac
78 # compiler and platform. BASECFLAGS tweaks need to be made even if the 78 # compiler and platform. BASECFLAGS tweaks need to be made even if the
79 # user set OPT. 79 # user set OPT.
80 80
@@ -83,7 +83,7 @@ index a189d42..0f85486 100644
83 *clang*) 83 *clang*)
84 cc_is_clang=1 84 cc_is_clang=1
85 ;; 85 ;;
86@@ -1622,7 +1623,7 @@ yes) 86@@ -1653,7 +1654,7 @@ yes)
87 87
88 # ICC doesn't recognize the option, but only emits a warning 88 # ICC doesn't recognize the option, but only emits a warning
89 ## XXX does it emit an unused result warning and can it be disabled? 89 ## XXX does it emit an unused result warning and can it be disabled?
@@ -92,16 +92,16 @@ index a189d42..0f85486 100644
92 *icc*) 92 *icc*)
93 ac_cv_disable_unused_result_warning=no 93 ac_cv_disable_unused_result_warning=no
94 ;; 94 ;;
95@@ -1943,7 +1944,7 @@ yes) 95@@ -1993,7 +1994,7 @@ yes)
96 ;;
96 esac 97 esac
97 98
98 # ICC needs -fp-model strict or floats behave badly
99-case "$CC" in 99-case "$CC" in
100+case "$cc_basename" in 100+case "$cc_basename" in
101 *icc*) 101 *icc*)
102 # ICC needs -fp-model strict or floats behave badly
102 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict" 103 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
103 ;; 104@@ -2765,7 +2766,7 @@ then
104@@ -2711,7 +2712,7 @@ then
105 then 105 then
106 LINKFORSHARED="-Wl,--export-dynamic" 106 LINKFORSHARED="-Wl,--export-dynamic"
107 fi;; 107 fi;;
@@ -110,7 +110,7 @@ index a189d42..0f85486 100644
110 *gcc*) 110 *gcc*)
111 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null 111 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
112 then 112 then
113@@ -5362,7 +5363,7 @@ if test "$have_gcc_asm_for_x87" = yes; then 113@@ -5507,7 +5508,7 @@ if test "$have_gcc_asm_for_x87" = yes; then
114 # Some versions of gcc miscompile inline asm: 114 # Some versions of gcc miscompile inline asm:
115 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491 115 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
116 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html 116 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
diff --git a/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch b/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
index 4bd98f62fd..5c620361da 100644
--- a/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
+++ b/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
@@ -25,7 +25,7 @@ index 7691258..ec3f2a4 100644
25 25
26+ # There is no need to report missing module dependencies, 26+ # There is no need to report missing module dependencies,
27+ # if the modules have been disabled in the first place. 27+ # if the modules have been disabled in the first place.
28+ self.missing = list(set(self.missing) - set(sysconf_dis)) 28+ self.missing = list(set(self.missing) - set(mods_disabled))
29+ 29+
30 if self.missing: 30 if self.missing:
31 print() 31 print()
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 820fb98ed8..5a39cf8933 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,27 +1,26 @@
1From 064187668fcbefdd39a8cde372bf651124c3e578 Mon Sep 17 00:00:00 2001 1From c52fa7948ef109db1132fdc1aee0b68f8d767b4e 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] python3: Add target and native recipes 4Subject: [PATCH 1/2] python3: Add target and native recipes
5 5
6Upstream-Status: Inappropriate [embedded specific] 6Upstream-Status: Inappropriate [embedded specific]
7 7
802/2015 Rebased for Python 3.4.2 802/2015 Rebased for Python 3.4.2
9 9
10# The proper prefix is inside our staging area. 10The proper prefix is inside our staging area.
11# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> 11Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
12# Signed-off-by: Phil Blundell <philb@gnu.org> 12Signed-off-by: Phil Blundell <philb@gnu.org>
13# Signed-off-by: Khem Raj <raj.khem@gmail.com> 13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14# Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> 14Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
15
16--- 15---
17 Lib/distutils/sysconfig.py | 14 +++++++++++--- 16 Lib/distutils/sysconfig.py | 14 +++++++++++---
18 1 file changed, 11 insertions(+), 3 deletions(-) 17 1 file changed, 11 insertions(+), 3 deletions(-)
19 18
20diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py 19diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
21index 2df348c..4f8db84 100644 20index 4774e12..ccf7d58 100644
22--- a/Lib/distutils/sysconfig.py 21--- a/Lib/distutils/sysconfig.py
23+++ b/Lib/distutils/sysconfig.py 22+++ b/Lib/distutils/sysconfig.py
24@@ -96,7 +96,9 @@ def get_python_inc(plat_specific=0, prefix=None): 23@@ -95,7 +95,9 @@ def get_python_inc(plat_specific=0, prefix=None):
25 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
26 sys.base_exec_prefix -- i.e., ignore 'plat_specific'. 25 sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
27 """ 26 """
@@ -32,7 +31,7 @@ index 2df348c..4f8db84 100644
32 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX 31 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
33 if os.name == "posix": 32 if os.name == "posix":
34 if python_build: 33 if python_build:
35@@ -139,7 +141,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): 34@@ -138,7 +140,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
36 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
37 sys.base_exec_prefix -- i.e., ignore 'plat_specific'. 36 sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
38 """ 37 """
@@ -47,12 +46,15 @@ index 2df348c..4f8db84 100644
47 if standard_lib: 46 if standard_lib:
48 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX 47 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
49 else: 48 else:
50@@ -147,7 +155,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): 49@@ -152,7 +160,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
51 50 else:
52 if os.name == "posix": 51 # Pure Python
53 libpython = os.path.join(prefix, 52 libdir = "lib"
54- "lib", "python" + get_python_version()) 53- libpython = os.path.join(prefix, libdir,
55+ lib_basename, "python" + get_python_version()) 54+ libpython = os.path.join(prefix, lib_basename,
55 "python" + get_python_version())
56 if standard_lib: 56 if standard_lib:
57 return libpython 57 return libpython
58 else: 58--
592.24.0
60
diff --git a/meta/recipes-devtools/python/python3/python-config.patch b/meta/recipes-devtools/python/python3/python-config.patch
index c8a8f3d4aa..d0ddbbc7fd 100644
--- a/meta/recipes-devtools/python/python3/python-config.patch
+++ b/meta/recipes-devtools/python/python3/python-config.patch
@@ -1,4 +1,4 @@
1From 07df0ae0d70cba6d1847fe1c24a71063930bec60 Mon Sep 17 00:00:00 2001 1From 57d073c12e7bede29919117b0141df14015eb27f Mon Sep 17 00:00:00 2001
2From: Tyler Hall <tylerwhall@gmail.com> 2From: Tyler Hall <tylerwhall@gmail.com>
3Date: Sun, 4 May 2014 20:06:43 -0400 3Date: Sun, 4 May 2014 20:06:43 -0400
4Subject: [PATCH] python-config: Revert to using distutils.sysconfig 4Subject: [PATCH] python-config: Revert to using distutils.sysconfig
@@ -21,7 +21,7 @@ Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
21 1 file changed, 5 insertions(+), 5 deletions(-) 21 1 file changed, 5 insertions(+), 5 deletions(-)
22 22
23diff --git a/Misc/python-config.in b/Misc/python-config.in 23diff --git a/Misc/python-config.in b/Misc/python-config.in
24index 727c4a8..c702829 100644 24index ebd99da..13e57ae 100644
25--- a/Misc/python-config.in 25--- a/Misc/python-config.in
26+++ b/Misc/python-config.in 26+++ b/Misc/python-config.in
27@@ -6,7 +6,7 @@ 27@@ -6,7 +6,7 @@
@@ -37,11 +37,11 @@ index 727c4a8..c702829 100644
37 37
38 for opt in opt_flags: 38 for opt in opt_flags:
39 if opt == '--prefix': 39 if opt == '--prefix':
40- print(sysconfig.get_config_var('prefix')) 40- print(getvar('prefix'))
41+ print(sysconfig.PREFIX) 41+ print(sysconfig.PREFIX)
42 42
43 elif opt == '--exec-prefix': 43 elif opt == '--exec-prefix':
44- print(sysconfig.get_config_var('exec_prefix')) 44- print(getvar('exec_prefix'))
45+ print(sysconfig.EXEC_PREFIX) 45+ print(sysconfig.EXEC_PREFIX)
46 46
47 elif opt in ('--includes', '--cflags'): 47 elif opt in ('--includes', '--cflags'):
diff --git a/meta/recipes-devtools/python/python3_3.8.5.bb b/meta/recipes-devtools/python/python3_3.9.0.bb
index 2a3c52a116..6402760a1b 100644
--- a/meta/recipes-devtools/python/python3_3.8.5.bb
+++ b/meta/recipes-devtools/python/python3_3.9.0.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.python.org"
3LICENSE = "PSFv2" 3LICENSE = "PSFv2"
4SECTION = "devel/python" 4SECTION = "devel/python"
5 5
6LIC_FILES_CHKSUM = "file://LICENSE;md5=203a6dbc802ee896020a47161e759642" 6LIC_FILES_CHKSUM = "file://LICENSE;md5=33223c9ef60c31e3f0e866cb09b65e83"
7 7
8SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ 8SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
9 file://run-ptest \ 9 file://run-ptest \
@@ -11,27 +11,24 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
11 file://get_module_deps3.py \ 11 file://get_module_deps3.py \
12 file://python3-manifest.json \ 12 file://python3-manifest.json \
13 file://check_build_completeness.py \ 13 file://check_build_completeness.py \
14 file://reformat_sysconfig.py \
14 file://cgi_py.patch \ 15 file://cgi_py.patch \
15 file://0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch \ 16 file://0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch \
16 ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \ 17 ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \
17 file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \ 18 file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
18 file://python-config.patch \ 19 file://python-config.patch \
19 file://0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch \ 20 file://0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch \
20 file://0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch \
21 file://0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch \ 21 file://0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch \
22 file://0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch \
23 file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \ 22 file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \
24 file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \ 23 file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \
25 file://crosspythonpath.patch \ 24 file://crosspythonpath.patch \
26 file://reformat_sysconfig.py \
27 file://0001-Use-FLAG_REF-always-for-interned-strings.patch \ 25 file://0001-Use-FLAG_REF-always-for-interned-strings.patch \
28 file://0001-test_locale.py-correct-the-test-output-format.patch \ 26 file://0001-test_locale.py-correct-the-test-output-format.patch \
29 file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \ 27 file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \
30 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 \
31 file://0001-Makefile-do-not-compile-.pyc-in-parallel.patch \ 29 file://0001-Makefile-do-not-compile-.pyc-in-parallel.patch \
32 file://0001-configure.ac-fix-LIBPL.patch \
33 file://0001-python3-Do-not-hardcode-lib-for-distutils.patch \
34 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 \
35 " 32 "
36 33
37SRC_URI_append_class-native = " \ 34SRC_URI_append_class-native = " \
@@ -40,8 +37,7 @@ SRC_URI_append_class-native = " \
40 file://0001-Don-t-search-system-for-headers-libraries.patch \ 37 file://0001-Don-t-search-system-for-headers-libraries.patch \
41 " 38 "
42 39
43SRC_URI[md5sum] = "35b5a3d0254c1c59be9736373d429db7" 40SRC_URI[sha256sum] = "9c73e63c99855709b9be0b3cc9e5b072cb60f37311e8c4e50f15576a0bf82854"
44SRC_URI[sha256sum] = "e3003ed57db17e617acb382b0cade29a248c6026b1bd8aad1f976e9af66a83b0"
45 41
46# exclude pre-releases for both python 2.x and 3.x 42# exclude pre-releases for both python 2.x and 3.x
47UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" 43UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
@@ -52,7 +48,7 @@ CVE_PRODUCT = "python"
52# This is not exploitable when glibc has CVE-2016-10739 fixed. 48# This is not exploitable when glibc has CVE-2016-10739 fixed.
53CVE_CHECK_WHITELIST += "CVE-2019-18348" 49CVE_CHECK_WHITELIST += "CVE-2019-18348"
54 50
55PYTHON_MAJMIN = "3.8" 51PYTHON_MAJMIN = "3.9"
56 52
57S = "${WORKDIR}/Python-${PV}" 53S = "${WORKDIR}/Python-${PV}"
58 54
@@ -71,7 +67,7 @@ DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/li
71DEPENDS_append_class-target = " python3-native" 67DEPENDS_append_class-target = " python3-native"
72DEPENDS_append_class-nativesdk = " python3-native" 68DEPENDS_append_class-nativesdk = " python3-native"
73 69
74EXTRA_OECONF = " --without-ensurepip --enable-shared" 70EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib}"
75EXTRA_OECONF_append_class-native = " --bindir=${bindir}/${PN}" 71EXTRA_OECONF_append_class-native = " --bindir=${bindir}/${PN}"
76 72
77export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/" 73export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/"
@@ -162,6 +158,14 @@ do_install_append() {
162 -e "/^ 'INCLDIRSTOMAKE'/{N; s,/usr/include,${STAGING_INCDIR},g}" \ 158 -e "/^ 'INCLDIRSTOMAKE'/{N; s,/usr/include,${STAGING_INCDIR},g}" \
163 -e "/^ 'INCLUDEPY'/s,/usr/include,${STAGING_INCDIR},g" \ 159 -e "/^ 'INCLUDEPY'/s,/usr/include,${STAGING_INCDIR},g" \
164 ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py 160 ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
161
162 # Unfortunately the following pyc files are non-deterministc due to 'frozenset'
163 # being written without strict ordering, even with PYTHONHASHSEED = 0
164 # Upstream is discussing ways to solve the issue properly, until then let's
165 # just not install the problematic files.
166 # More info: http://benno.id.au/blog/2013/01/15/python-determinism
167 rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython*
168 rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython*
165} 169}
166 170
167do_install_append_class-nativesdk () { 171do_install_append_class-nativesdk () {