mirror of
https://git.yoctoproject.org/poky
synced 2026-09-15 15:49:32 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
bb5bfc3ac7
commit
354f96bf78
@@ -1,4 +1,4 @@
|
|||||||
PYTHON_BASEVERSION = "3.8"
|
PYTHON_BASEVERSION = "3.9"
|
||||||
PYTHON_ABI = ""
|
PYTHON_ABI = ""
|
||||||
PYTHON_DIR = "python${PYTHON_BASEVERSION}"
|
PYTHON_DIR = "python${PYTHON_BASEVERSION}"
|
||||||
PYTHON_PN = "python3"
|
PYTHON_PN = "python3"
|
||||||
|
|||||||
@@ -1,214 +0,0 @@
|
|||||||
From a078b6ff1492e848ad1055764fb9a414abaf3e12 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 | 22 ++++++++++++++--------
|
|
||||||
Python/getplatform.c | 10 ++++++++++
|
|
||||||
Python/sysmodule.c | 2 ++
|
|
||||||
6 files changed, 33 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
|
|
||||||
index 46091e0..61b2e15 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_AnyFileExFlags(
|
|
||||||
diff --git a/Lib/site.py b/Lib/site.py
|
|
||||||
index a065ab0..1d720ef 100644
|
|
||||||
--- a/Lib/site.py
|
|
||||||
+++ b/Lib/site.py
|
|
||||||
@@ -335,12 +335,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 65665df..be49140 100644
|
|
||||||
--- a/Makefile.pre.in
|
|
||||||
+++ b/Makefile.pre.in
|
|
||||||
@@ -143,7 +143,7 @@ LIBDIR= @libdir@
|
|
||||||
MANDIR= @mandir@
|
|
||||||
INCLUDEDIR= @includedir@
|
|
||||||
CONFINCLUDEDIR= $(exec_prefix)/include
|
|
||||||
-SCRIPTDIR= $(prefix)/lib
|
|
||||||
+SCRIPTDIR= @libdir@
|
|
||||||
ABIFLAGS= @ABIFLAGS@
|
|
||||||
|
|
||||||
# Detailed destination directories
|
|
||||||
@@ -753,6 +753,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
|
|
||||||
@@ -868,7 +869,7 @@ regen-symbol: $(srcdir)/Include/graminit.h
|
|
||||||
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
|
|
||||||
|
|
||||||
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 b727f66..c003e46 100644
|
|
||||||
--- a/Modules/getpath.c
|
|
||||||
+++ b/Modules/getpath.c
|
|
||||||
@@ -128,6 +128,7 @@ typedef struct {
|
|
||||||
wchar_t *exec_prefix; /* EXEC_PREFIX macro */
|
|
||||||
|
|
||||||
wchar_t *lib_python; /* "lib/pythonX.Y" */
|
|
||||||
+ wchar_t *multilib_python; /* "lib[suffix]/pythonX.Y" */
|
|
||||||
|
|
||||||
int prefix_found; /* found platform independent libraries? */
|
|
||||||
int exec_prefix_found; /* found the platform dependent libraries? */
|
|
||||||
@@ -386,7 +387,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
|
|
||||||
if (delim) {
|
|
||||||
*delim = L'\0';
|
|
||||||
}
|
|
||||||
- status = joinpath(prefix, calculate->lib_python, prefix_len);
|
|
||||||
+ status = joinpath(prefix, calculate->multilib_python, prefix_len);
|
|
||||||
if (_PyStatus_EXCEPTION(status)) {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
@@ -444,7 +445,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
|
|
||||||
do {
|
|
||||||
/* Path: <argv0_path or substring> / <lib_python> / LANDMARK */
|
|
||||||
size_t n = wcslen(prefix);
|
|
||||||
- status = joinpath(prefix, calculate->lib_python, prefix_len);
|
|
||||||
+ status = joinpath(prefix, calculate->multilib_python, prefix_len);
|
|
||||||
if (_PyStatus_EXCEPTION(status)) {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
@@ -467,7 +468,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
|
|
||||||
if (safe_wcscpy(prefix, calculate->prefix, prefix_len) < 0) {
|
|
||||||
return PATHLEN_ERR();
|
|
||||||
}
|
|
||||||
- status = joinpath(prefix, calculate->lib_python, prefix_len);
|
|
||||||
+ status = joinpath(prefix, calculate->multilib_python, prefix_len);
|
|
||||||
if (_PyStatus_EXCEPTION(status)) {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
@@ -510,7 +511,7 @@ calculate_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
|
|
||||||
if (safe_wcscpy(prefix, calculate->prefix, prefix_len) < 0) {
|
|
||||||
return PATHLEN_ERR();
|
|
||||||
}
|
|
||||||
- status = joinpath(prefix, calculate->lib_python, prefix_len);
|
|
||||||
+ status = joinpath(prefix, calculate->multilib_python, prefix_len);
|
|
||||||
if (_PyStatus_EXCEPTION(status)) {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
@@ -635,7 +636,7 @@ search_for_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
|
|
||||||
return PATHLEN_ERR();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- status = joinpath(exec_prefix, calculate->lib_python, exec_prefix_len);
|
|
||||||
+ status = joinpath(exec_prefix, calculate->multilib_python, exec_prefix_len);
|
|
||||||
if (_PyStatus_EXCEPTION(status)) {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
@@ -667,7 +668,7 @@ search_for_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
|
|
||||||
do {
|
|
||||||
/* Path: <argv0_path or substring> / <lib_python> / "lib-dynload" */
|
|
||||||
size_t n = wcslen(exec_prefix);
|
|
||||||
- status = joinpath(exec_prefix, calculate->lib_python, exec_prefix_len);
|
|
||||||
+ status = joinpath(exec_prefix, calculate->multilib_python, exec_prefix_len);
|
|
||||||
if (_PyStatus_EXCEPTION(status)) {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
@@ -689,7 +690,7 @@ search_for_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
|
|
||||||
if (safe_wcscpy(exec_prefix, calculate->exec_prefix, exec_prefix_len) < 0) {
|
|
||||||
return PATHLEN_ERR();
|
|
||||||
}
|
|
||||||
- status = joinpath(exec_prefix, calculate->lib_python, exec_prefix_len);
|
|
||||||
+ status = joinpath(exec_prefix, calculate->multilib_python, exec_prefix_len);
|
|
||||||
if (_PyStatus_EXCEPTION(status)) {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
@@ -928,7 +929,7 @@ calculate_argv0_path(PyCalculatePath *calculate, const wchar_t *program_full_pat
|
|
||||||
return PATHLEN_ERR();
|
|
||||||
}
|
|
||||||
reduce(argv0_path);
|
|
||||||
- status = joinpath(argv0_path, calculate->lib_python, argv0_path_len);
|
|
||||||
+ status = joinpath(argv0_path, calculate->multilib_python, argv0_path_len);
|
|
||||||
if (_PyStatus_EXCEPTION(status)) {
|
|
||||||
PyMem_RawFree(wbuf);
|
|
||||||
return status;
|
|
||||||
@@ -1201,6 +1202,10 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config)
|
|
||||||
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);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
calculate->warnings = config->pathconfig_warnings;
|
|
||||||
calculate->pythonpath_env = config->pythonpath_env;
|
|
||||||
@@ -1216,6 +1221,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 5b0fb81..0dce754 100644
|
|
||||||
--- a/Python/sysmodule.c
|
|
||||||
+++ b/Python/sysmodule.c
|
|
||||||
@@ -2668,6 +2668,8 @@ _PySys_InitCore(_PyRuntimeState *runtime, PyInterpreterState *interp,
|
|
||||||
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",
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
From b880e78bf4a1852e260188e6df3ec6034403d2fc Mon Sep 17 00:00:00 2001
|
From 9da913bf5f39c6fe737219af7419170574d6fbfb Mon Sep 17 00:00:00 2001
|
||||||
From: Jeremy Puhlman <jpuhlman@mvista.com>
|
From: Jeremy Puhlman <jpuhlman@mvista.com>
|
||||||
Date: Wed, 4 Mar 2020 00:06:42 +0000
|
Date: Wed, 4 Mar 2020 00:06:42 +0000
|
||||||
Subject: [PATCH] Don't search system for headers/libraries
|
Subject: [PATCH] Don't search system for headers/libraries
|
||||||
@@ -11,7 +11,7 @@ Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
|
|||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/setup.py b/setup.py
|
diff --git a/setup.py b/setup.py
|
||||||
index 7208cd0..c0bd0ad 100644
|
index a0bf9ea..da099bf 100644
|
||||||
--- a/setup.py
|
--- a/setup.py
|
||||||
+++ b/setup.py
|
+++ b/setup.py
|
||||||
@@ -674,8 +674,8 @@ class PyBuildExt(build_ext):
|
@@ -674,8 +674,8 @@ class PyBuildExt(build_ext):
|
||||||
|
|||||||
@@ -1,27 +1,28 @@
|
|||||||
From a21f4f8fa5e5c0601898740b4ac08ec84f41e190 Mon Sep 17 00:00:00 2001
|
From deeedd1b8799294ab276ab7dbbfdb59c1dacc9a2 Mon Sep 17 00:00:00 2001
|
||||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||||
Date: Thu, 18 Apr 2019 17:11:06 +0200
|
Date: Thu, 22 Oct 2020 13:10:34 +0200
|
||||||
Subject: [PATCH] Lib/sysconfig.py: fix another place where 'lib' is hardcoded
|
Subject: [PATCH] Lib/sysconfig.py: use libdir values from configuration file
|
||||||
as the library path
|
|
||||||
|
This allows correctly substituting them for target installs using
|
||||||
|
native python.
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [oe-core specific]
|
|
||||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||||
---
|
---
|
||||||
Lib/sysconfig.py | 8 ++++----
|
Lib/sysconfig.py | 8 ++++----
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
|
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
|
||||||
index d15cec8..87fa5e6 100644
|
index bf04ac5..ed0462b 100644
|
||||||
--- a/Lib/sysconfig.py
|
--- a/Lib/sysconfig.py
|
||||||
+++ b/Lib/sysconfig.py
|
+++ b/Lib/sysconfig.py
|
||||||
@@ -20,10 +20,10 @@ __all__ = [
|
@@ -20,10 +20,10 @@ __all__ = [
|
||||||
|
|
||||||
_INSTALL_SCHEMES = {
|
_INSTALL_SCHEMES = {
|
||||||
'posix_prefix': {
|
'posix_prefix': {
|
||||||
- 'stdlib': '{installed_base}/lib/python{py_version_short}',
|
- 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}',
|
||||||
- 'platstdlib': '{platbase}/lib/python{py_version_short}',
|
- 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}',
|
||||||
- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
|
- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
|
||||||
- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
|
- 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages',
|
||||||
+ 'stdlib': '{LIBDEST}',
|
+ 'stdlib': '{LIBDEST}',
|
||||||
+ 'platstdlib': '{LIBDEST}',
|
+ 'platstdlib': '{LIBDEST}',
|
||||||
+ 'purelib': '{LIBDEST}/site-packages',
|
+ 'purelib': '{LIBDEST}/site-packages',
|
||||||
@@ -29,3 +30,6 @@ index d15cec8..87fa5e6 100644
|
|||||||
'include':
|
'include':
|
||||||
'{installed_base}/include/python{py_version_short}{abiflags}',
|
'{installed_base}/include/python{py_version_short}{abiflags}',
|
||||||
'platinclude':
|
'platinclude':
|
||||||
|
--
|
||||||
|
2.24.0
|
||||||
|
|
||||||
@@ -1,19 +1,20 @@
|
|||||||
From 6c8ea7c1dacd42f3ba00440231ec0e6b1a38300d Mon Sep 17 00:00:00 2001
|
From 9f63e83b1cec872917647b11155edaffe399d103 Mon Sep 17 00:00:00 2001
|
||||||
From: Inada Naoki <songofacandy@gmail.com>
|
From: Inada Naoki <songofacandy@gmail.com>
|
||||||
Date: Sat, 14 Jul 2018 00:46:11 +0900
|
Date: Sat, 14 Jul 2018 00:46:11 +0900
|
||||||
Subject: [PATCH] Use FLAG_REF always for interned strings
|
Subject: [PATCH] Use FLAG_REF always for interned strings
|
||||||
|
|
||||||
Upstream-Status: Submitted [https://github.com/python/cpython/pull/8226]
|
Upstream-Status: Submitted [https://github.com/python/cpython/pull/8226]
|
||||||
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
|
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
|
||||||
|
|
||||||
---
|
---
|
||||||
Python/marshal.c | 9 +++++++--
|
Python/marshal.c | 9 +++++++--
|
||||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/Python/marshal.c b/Python/marshal.c
|
diff --git a/Python/marshal.c b/Python/marshal.c
|
||||||
index 6d06266c6a..51db2e3b2e 100644
|
index c4538bd..2437160 100644
|
||||||
--- a/Python/marshal.c
|
--- a/Python/marshal.c
|
||||||
+++ b/Python/marshal.c
|
+++ b/Python/marshal.c
|
||||||
@@ -275,9 +275,14 @@ w_ref(PyObject *v, char *flag, WFILE *p)
|
@@ -298,9 +298,14 @@ w_ref(PyObject *v, char *flag, WFILE *p)
|
||||||
if (p->version < 3 || p->hashtable == NULL)
|
if (p->version < 3 || p->hashtable == NULL)
|
||||||
return 0; /* not writing object references */
|
return 0; /* not writing object references */
|
||||||
|
|
||||||
@@ -28,8 +29,5 @@ index 6d06266c6a..51db2e3b2e 100644
|
|||||||
return 0;
|
return 0;
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
entry = _Py_HASHTABLE_GET_ENTRY(p->hashtable, v);
|
entry = _Py_hashtable_get_entry(p->hashtable, v);
|
||||||
if (entry != NULL) {
|
if (entry != NULL) {
|
||||||
--
|
|
||||||
2.21.0
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
From acce3d441e7eadadd2d3ce38654155dc43f1f607 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Changqing Li <changqing.li@windriver.com>
|
|
||||||
Date: Fri, 7 Feb 2020 09:36:25 +0800
|
|
||||||
Subject: [PATCH] configure.ac: fix LIBPL
|
|
||||||
|
|
||||||
Use LIBDIR rather than prefix/lib, so that it would work when lib64.
|
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [oe-core specific]
|
|
||||||
|
|
||||||
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
|
||||||
Signed-off-by: Li Zhou <li.zhou@windriver.c>
|
|
||||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
|
||||||
---
|
|
||||||
configure.ac | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index ce04258..915f475 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -4532,9 +4532,9 @@ fi
|
|
||||||
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
|
|
||||||
AC_SUBST(PY_ENABLE_SHARED)
|
|
||||||
if test x$PLATFORM_TRIPLET = x; then
|
|
||||||
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
|
|
||||||
+ LIBPL='$(LIBDIR)'"/python${VERSION}/config-${LDVERSION}"
|
|
||||||
else
|
|
||||||
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
|
|
||||||
+ LIBPL='$(LIBDIR)'"/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
|
|
||||||
fi
|
|
||||||
AC_SUBST(LIBPL)
|
|
||||||
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
From bc59d49efff41051034d7fbf5d0c8505e4c3134b Mon Sep 17 00:00:00 2001
|
From e65bfe22c858872b08366aff49119d4145a77f40 Mon Sep 17 00:00:00 2001
|
||||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||||
Date: Thu, 31 Jan 2019 16:46:30 +0100
|
Date: Thu, 31 Jan 2019 16:46:30 +0100
|
||||||
Subject: [PATCH] distutils/sysconfig: append
|
Subject: [PATCH] distutils/sysconfig: append
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
From bb711b53f10d32a90a27ccf4b0dc51e4a701d862 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Changqing Li <changqing.li@windriver.com>
|
|
||||||
Date: Fri, 7 Feb 2020 09:42:09 +0800
|
|
||||||
Subject: [PATCH] python3: Do not hardcode "lib" for distutils
|
|
||||||
|
|
||||||
Get the sys.lib from python3 itself and do not use
|
|
||||||
hardcoded value of 'lib' for distutils.
|
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [oe-core specific]
|
|
||||||
|
|
||||||
Signed-off-by: Li Zhou <li.zhou@windriver.com>
|
|
||||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
|
||||||
---
|
|
||||||
Lib/distutils/command/install.py | 6 ++++--
|
|
||||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
|
|
||||||
index c625c95..8e32f54 100644
|
|
||||||
--- a/Lib/distutils/command/install.py
|
|
||||||
+++ b/Lib/distutils/command/install.py
|
|
||||||
@@ -19,6 +19,8 @@ from site import USER_BASE
|
|
||||||
from site import USER_SITE
|
|
||||||
HAS_USER_SITE = True
|
|
||||||
|
|
||||||
+libname = sys.lib
|
|
||||||
+
|
|
||||||
WINDOWS_SCHEME = {
|
|
||||||
'purelib': '$base/Lib/site-packages',
|
|
||||||
'platlib': '$base/Lib/site-packages',
|
|
||||||
@@ -29,8 +31,8 @@ WINDOWS_SCHEME = {
|
|
||||||
|
|
||||||
INSTALL_SCHEMES = {
|
|
||||||
'unix_prefix': {
|
|
||||||
- 'purelib': '$base/lib/python$py_version_short/site-packages',
|
|
||||||
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
|
|
||||||
+ 'purelib': '$base/' + libname + '/python$py_version_short/site-packages',
|
|
||||||
+ 'platlib': '$platbase/' + libname + '/python$py_version_short/site-packages',
|
|
||||||
'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
|
|
||||||
'scripts': '$base/bin',
|
|
||||||
'data' : '$base',
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
From 994783da5c21cab81b6589ed2d4275e665a946f9 Mon Sep 17 00:00:00 2001
|
From 5f9eea2c4f8716830f6c8855a3e10872119fae32 Mon Sep 17 00:00:00 2001
|
||||||
From: Changqing Li <changqing.li@windriver.com>
|
From: Changqing Li <changqing.li@windriver.com>
|
||||||
Date: Mon, 22 Oct 2018 15:19:51 +0800
|
Date: Mon, 22 Oct 2018 15:19:51 +0800
|
||||||
Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler
|
Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler
|
||||||
@@ -27,7 +27,7 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
|||||||
1 file changed, 10 insertions(+), 9 deletions(-)
|
1 file changed, 10 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
diff --git a/configure.ac b/configure.ac
|
||||||
index a189d42..0f85486 100644
|
index d60f052..e491e24 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -54,6 +54,7 @@ AC_CONFIG_HEADER(pyconfig.h)
|
@@ -54,6 +54,7 @@ AC_CONFIG_HEADER(pyconfig.h)
|
||||||
@@ -38,7 +38,7 @@ index a189d42..0f85486 100644
|
|||||||
|
|
||||||
# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
|
# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
|
||||||
rm -f pybuilddir.txt
|
rm -f pybuilddir.txt
|
||||||
@@ -671,7 +672,7 @@ AC_MSG_RESULT($with_cxx_main)
|
@@ -689,7 +690,7 @@ AC_MSG_RESULT($with_cxx_main)
|
||||||
preset_cxx="$CXX"
|
preset_cxx="$CXX"
|
||||||
if test -z "$CXX"
|
if test -z "$CXX"
|
||||||
then
|
then
|
||||||
@@ -47,7 +47,7 @@ index a189d42..0f85486 100644
|
|||||||
gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
|
gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
|
||||||
cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
|
cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
|
||||||
clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;;
|
clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;;
|
||||||
@@ -957,7 +958,7 @@ rmdir CaseSensitiveTestDir
|
@@ -975,7 +976,7 @@ rmdir CaseSensitiveTestDir
|
||||||
|
|
||||||
case $ac_sys_system in
|
case $ac_sys_system in
|
||||||
hp*|HP*)
|
hp*|HP*)
|
||||||
@@ -56,7 +56,7 @@ index a189d42..0f85486 100644
|
|||||||
cc|*/cc) CC="$CC -Ae";;
|
cc|*/cc) CC="$CC -Ae";;
|
||||||
esac;;
|
esac;;
|
||||||
esac
|
esac
|
||||||
@@ -1335,7 +1336,7 @@ else
|
@@ -1366,7 +1367,7 @@ else
|
||||||
fi],
|
fi],
|
||||||
[AC_MSG_RESULT(no)])
|
[AC_MSG_RESULT(no)])
|
||||||
if test "$Py_LTO" = 'true' ; then
|
if test "$Py_LTO" = 'true' ; then
|
||||||
@@ -65,7 +65,7 @@ index a189d42..0f85486 100644
|
|||||||
*clang*)
|
*clang*)
|
||||||
AC_SUBST(LLVM_AR)
|
AC_SUBST(LLVM_AR)
|
||||||
AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
|
AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
|
||||||
@@ -1425,7 +1426,7 @@ then
|
@@ -1456,7 +1457,7 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
LLVM_PROF_ERR=no
|
LLVM_PROF_ERR=no
|
||||||
@@ -74,7 +74,7 @@ index a189d42..0f85486 100644
|
|||||||
*clang*)
|
*clang*)
|
||||||
# Any changes made here should be reflected in the GCC+Darwin case below
|
# Any changes made here should be reflected in the GCC+Darwin case below
|
||||||
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
|
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
|
||||||
@@ -1486,7 +1487,7 @@ esac
|
@@ -1517,7 +1518,7 @@ esac
|
||||||
# compiler and platform. BASECFLAGS tweaks need to be made even if the
|
# compiler and platform. BASECFLAGS tweaks need to be made even if the
|
||||||
# user set OPT.
|
# user set OPT.
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ index a189d42..0f85486 100644
|
|||||||
*clang*)
|
*clang*)
|
||||||
cc_is_clang=1
|
cc_is_clang=1
|
||||||
;;
|
;;
|
||||||
@@ -1622,7 +1623,7 @@ yes)
|
@@ -1653,7 +1654,7 @@ yes)
|
||||||
|
|
||||||
# ICC doesn't recognize the option, but only emits a warning
|
# ICC doesn't recognize the option, but only emits a warning
|
||||||
## XXX does it emit an unused result warning and can it be disabled?
|
## XXX does it emit an unused result warning and can it be disabled?
|
||||||
@@ -92,16 +92,16 @@ index a189d42..0f85486 100644
|
|||||||
*icc*)
|
*icc*)
|
||||||
ac_cv_disable_unused_result_warning=no
|
ac_cv_disable_unused_result_warning=no
|
||||||
;;
|
;;
|
||||||
@@ -1943,7 +1944,7 @@ yes)
|
@@ -1993,7 +1994,7 @@ yes)
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# ICC needs -fp-model strict or floats behave badly
|
|
||||||
-case "$CC" in
|
-case "$CC" in
|
||||||
+case "$cc_basename" in
|
+case "$cc_basename" in
|
||||||
*icc*)
|
*icc*)
|
||||||
|
# ICC needs -fp-model strict or floats behave badly
|
||||||
CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
|
CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
|
||||||
;;
|
@@ -2765,7 +2766,7 @@ then
|
||||||
@@ -2711,7 +2712,7 @@ then
|
|
||||||
then
|
then
|
||||||
LINKFORSHARED="-Wl,--export-dynamic"
|
LINKFORSHARED="-Wl,--export-dynamic"
|
||||||
fi;;
|
fi;;
|
||||||
@@ -110,7 +110,7 @@ index a189d42..0f85486 100644
|
|||||||
*gcc*)
|
*gcc*)
|
||||||
if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
|
if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
|
||||||
then
|
then
|
||||||
@@ -5362,7 +5363,7 @@ if test "$have_gcc_asm_for_x87" = yes; then
|
@@ -5507,7 +5508,7 @@ if test "$have_gcc_asm_for_x87" = yes; then
|
||||||
# Some versions of gcc miscompile inline asm:
|
# Some versions of gcc miscompile inline asm:
|
||||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
|
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
|
||||||
# http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
|
# http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ index 7691258..ec3f2a4 100644
|
|||||||
|
|
||||||
+ # There is no need to report missing module dependencies,
|
+ # There is no need to report missing module dependencies,
|
||||||
+ # if the modules have been disabled in the first place.
|
+ # if the modules have been disabled in the first place.
|
||||||
+ self.missing = list(set(self.missing) - set(sysconf_dis))
|
+ self.missing = list(set(self.missing) - set(mods_disabled))
|
||||||
+
|
+
|
||||||
if self.missing:
|
if self.missing:
|
||||||
print()
|
print()
|
||||||
|
|||||||
@@ -1,27 +1,26 @@
|
|||||||
From 064187668fcbefdd39a8cde372bf651124c3e578 Mon Sep 17 00:00:00 2001
|
From c52fa7948ef109db1132fdc1aee0b68f8d767b4e Mon Sep 17 00:00:00 2001
|
||||||
From: Khem Raj <raj.khem@gmail.com>
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
Date: Tue, 14 May 2013 15:00:26 -0700
|
Date: Tue, 14 May 2013 15:00:26 -0700
|
||||||
Subject: [PATCH] python3: Add target and native recipes
|
Subject: [PATCH 1/2] python3: Add target and native recipes
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [embedded specific]
|
Upstream-Status: Inappropriate [embedded specific]
|
||||||
|
|
||||||
02/2015 Rebased for Python 3.4.2
|
02/2015 Rebased for Python 3.4.2
|
||||||
|
|
||||||
# The proper prefix is inside our staging area.
|
The proper prefix is inside our staging area.
|
||||||
# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
|
Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
|
||||||
# Signed-off-by: Phil Blundell <philb@gnu.org>
|
Signed-off-by: Phil Blundell <philb@gnu.org>
|
||||||
# Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
# Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
|
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
|
||||||
|
|
||||||
---
|
---
|
||||||
Lib/distutils/sysconfig.py | 14 +++++++++++---
|
Lib/distutils/sysconfig.py | 14 +++++++++++---
|
||||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
||||||
index 2df348c..4f8db84 100644
|
index 4774e12..ccf7d58 100644
|
||||||
--- a/Lib/distutils/sysconfig.py
|
--- a/Lib/distutils/sysconfig.py
|
||||||
+++ b/Lib/distutils/sysconfig.py
|
+++ b/Lib/distutils/sysconfig.py
|
||||||
@@ -96,7 +96,9 @@ def get_python_inc(plat_specific=0, prefix=None):
|
@@ -95,7 +95,9 @@ def get_python_inc(plat_specific=0, prefix=None):
|
||||||
If 'prefix' is supplied, use it instead of sys.base_prefix or
|
If 'prefix' is supplied, use it instead of sys.base_prefix or
|
||||||
sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
|
sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
|
||||||
"""
|
"""
|
||||||
@@ -32,7 +31,7 @@ index 2df348c..4f8db84 100644
|
|||||||
prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
|
prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
|
||||||
if os.name == "posix":
|
if os.name == "posix":
|
||||||
if python_build:
|
if python_build:
|
||||||
@@ -139,7 +141,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
@@ -138,7 +140,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
|
If 'prefix' is supplied, use it instead of sys.base_prefix or
|
||||||
sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
|
sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
|
||||||
"""
|
"""
|
||||||
@@ -47,12 +46,15 @@ index 2df348c..4f8db84 100644
|
|||||||
if standard_lib:
|
if standard_lib:
|
||||||
prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
|
prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
|
||||||
else:
|
else:
|
||||||
@@ -147,7 +155,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
@@ -152,7 +160,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
||||||
|
else:
|
||||||
if os.name == "posix":
|
# Pure Python
|
||||||
libpython = os.path.join(prefix,
|
libdir = "lib"
|
||||||
- "lib", "python" + get_python_version())
|
- libpython = os.path.join(prefix, libdir,
|
||||||
+ lib_basename, "python" + get_python_version())
|
+ libpython = os.path.join(prefix, lib_basename,
|
||||||
|
"python" + get_python_version())
|
||||||
if standard_lib:
|
if standard_lib:
|
||||||
return libpython
|
return libpython
|
||||||
else:
|
--
|
||||||
|
2.24.0
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 07df0ae0d70cba6d1847fe1c24a71063930bec60 Mon Sep 17 00:00:00 2001
|
From 57d073c12e7bede29919117b0141df14015eb27f Mon Sep 17 00:00:00 2001
|
||||||
From: Tyler Hall <tylerwhall@gmail.com>
|
From: Tyler Hall <tylerwhall@gmail.com>
|
||||||
Date: Sun, 4 May 2014 20:06:43 -0400
|
Date: Sun, 4 May 2014 20:06:43 -0400
|
||||||
Subject: [PATCH] python-config: Revert to using distutils.sysconfig
|
Subject: [PATCH] python-config: Revert to using distutils.sysconfig
|
||||||
@@ -21,7 +21,7 @@ Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
|
|||||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/Misc/python-config.in b/Misc/python-config.in
|
diff --git a/Misc/python-config.in b/Misc/python-config.in
|
||||||
index 727c4a8..c702829 100644
|
index ebd99da..13e57ae 100644
|
||||||
--- a/Misc/python-config.in
|
--- a/Misc/python-config.in
|
||||||
+++ b/Misc/python-config.in
|
+++ b/Misc/python-config.in
|
||||||
@@ -6,7 +6,7 @@
|
@@ -6,7 +6,7 @@
|
||||||
@@ -37,11 +37,11 @@ index 727c4a8..c702829 100644
|
|||||||
|
|
||||||
for opt in opt_flags:
|
for opt in opt_flags:
|
||||||
if opt == '--prefix':
|
if opt == '--prefix':
|
||||||
- print(sysconfig.get_config_var('prefix'))
|
- print(getvar('prefix'))
|
||||||
+ print(sysconfig.PREFIX)
|
+ print(sysconfig.PREFIX)
|
||||||
|
|
||||||
elif opt == '--exec-prefix':
|
elif opt == '--exec-prefix':
|
||||||
- print(sysconfig.get_config_var('exec_prefix'))
|
- print(getvar('exec_prefix'))
|
||||||
+ print(sysconfig.EXEC_PREFIX)
|
+ print(sysconfig.EXEC_PREFIX)
|
||||||
|
|
||||||
elif opt in ('--includes', '--cflags'):
|
elif opt in ('--includes', '--cflags'):
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.python.org"
|
|||||||
LICENSE = "PSFv2"
|
LICENSE = "PSFv2"
|
||||||
SECTION = "devel/python"
|
SECTION = "devel/python"
|
||||||
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=203a6dbc802ee896020a47161e759642"
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=33223c9ef60c31e3f0e866cb09b65e83"
|
||||||
|
|
||||||
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
||||||
file://run-ptest \
|
file://run-ptest \
|
||||||
@@ -11,27 +11,24 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
|||||||
file://get_module_deps3.py \
|
file://get_module_deps3.py \
|
||||||
file://python3-manifest.json \
|
file://python3-manifest.json \
|
||||||
file://check_build_completeness.py \
|
file://check_build_completeness.py \
|
||||||
|
file://reformat_sysconfig.py \
|
||||||
file://cgi_py.patch \
|
file://cgi_py.patch \
|
||||||
file://0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch \
|
file://0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch \
|
||||||
${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \
|
${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \
|
||||||
file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
|
file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
|
||||||
file://python-config.patch \
|
file://python-config.patch \
|
||||||
file://0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch \
|
file://0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch \
|
||||||
file://0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch \
|
|
||||||
file://0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch \
|
file://0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch \
|
||||||
file://0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch \
|
|
||||||
file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \
|
file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \
|
||||||
file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \
|
file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \
|
||||||
file://crosspythonpath.patch \
|
file://crosspythonpath.patch \
|
||||||
file://reformat_sysconfig.py \
|
|
||||||
file://0001-Use-FLAG_REF-always-for-interned-strings.patch \
|
file://0001-Use-FLAG_REF-always-for-interned-strings.patch \
|
||||||
file://0001-test_locale.py-correct-the-test-output-format.patch \
|
file://0001-test_locale.py-correct-the-test-output-format.patch \
|
||||||
file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \
|
file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \
|
||||||
file://0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \
|
file://0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \
|
||||||
file://0001-Makefile-do-not-compile-.pyc-in-parallel.patch \
|
file://0001-Makefile-do-not-compile-.pyc-in-parallel.patch \
|
||||||
file://0001-configure.ac-fix-LIBPL.patch \
|
|
||||||
file://0001-python3-Do-not-hardcode-lib-for-distutils.patch \
|
|
||||||
file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \
|
file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \
|
||||||
|
file://0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI_append_class-native = " \
|
SRC_URI_append_class-native = " \
|
||||||
@@ -40,8 +37,7 @@ SRC_URI_append_class-native = " \
|
|||||||
file://0001-Don-t-search-system-for-headers-libraries.patch \
|
file://0001-Don-t-search-system-for-headers-libraries.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "35b5a3d0254c1c59be9736373d429db7"
|
SRC_URI[sha256sum] = "9c73e63c99855709b9be0b3cc9e5b072cb60f37311e8c4e50f15576a0bf82854"
|
||||||
SRC_URI[sha256sum] = "e3003ed57db17e617acb382b0cade29a248c6026b1bd8aad1f976e9af66a83b0"
|
|
||||||
|
|
||||||
# exclude pre-releases for both python 2.x and 3.x
|
# exclude pre-releases for both python 2.x and 3.x
|
||||||
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
|
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
|
||||||
@@ -52,7 +48,7 @@ CVE_PRODUCT = "python"
|
|||||||
# This is not exploitable when glibc has CVE-2016-10739 fixed.
|
# This is not exploitable when glibc has CVE-2016-10739 fixed.
|
||||||
CVE_CHECK_WHITELIST += "CVE-2019-18348"
|
CVE_CHECK_WHITELIST += "CVE-2019-18348"
|
||||||
|
|
||||||
PYTHON_MAJMIN = "3.8"
|
PYTHON_MAJMIN = "3.9"
|
||||||
|
|
||||||
S = "${WORKDIR}/Python-${PV}"
|
S = "${WORKDIR}/Python-${PV}"
|
||||||
|
|
||||||
@@ -71,7 +67,7 @@ DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/li
|
|||||||
DEPENDS_append_class-target = " python3-native"
|
DEPENDS_append_class-target = " python3-native"
|
||||||
DEPENDS_append_class-nativesdk = " python3-native"
|
DEPENDS_append_class-nativesdk = " python3-native"
|
||||||
|
|
||||||
EXTRA_OECONF = " --without-ensurepip --enable-shared"
|
EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib}"
|
||||||
EXTRA_OECONF_append_class-native = " --bindir=${bindir}/${PN}"
|
EXTRA_OECONF_append_class-native = " --bindir=${bindir}/${PN}"
|
||||||
|
|
||||||
export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/"
|
export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/"
|
||||||
@@ -162,6 +158,14 @@ do_install_append() {
|
|||||||
-e "/^ 'INCLDIRSTOMAKE'/{N; s,/usr/include,${STAGING_INCDIR},g}" \
|
-e "/^ 'INCLDIRSTOMAKE'/{N; s,/usr/include,${STAGING_INCDIR},g}" \
|
||||||
-e "/^ 'INCLUDEPY'/s,/usr/include,${STAGING_INCDIR},g" \
|
-e "/^ 'INCLUDEPY'/s,/usr/include,${STAGING_INCDIR},g" \
|
||||||
${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
|
${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
|
||||||
|
|
||||||
|
# Unfortunately the following pyc files are non-deterministc due to 'frozenset'
|
||||||
|
# being written without strict ordering, even with PYTHONHASHSEED = 0
|
||||||
|
# Upstream is discussing ways to solve the issue properly, until then let's
|
||||||
|
# just not install the problematic files.
|
||||||
|
# More info: http://benno.id.au/blog/2013/01/15/python-determinism
|
||||||
|
rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython*
|
||||||
|
rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython*
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install_append_class-nativesdk () {
|
do_install_append_class-nativesdk () {
|
||||||
Reference in New Issue
Block a user