diff options
author | Changqing Li <changqing.li@windriver.com> | 2020-02-07 14:07:44 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-02-08 13:20:02 +0000 |
commit | b7a5901dd6c7ffa1b277d216c9b684b06137d852 (patch) | |
tree | 2928865116cd05054e7f4fc73c312a4ab9b1043c /meta | |
parent | e774c22381ccc6c56b6f8f4bf65f09da3ff89379 (diff) | |
download | poky-b7a5901dd6c7ffa1b277d216c9b684b06137d852.tar.gz |
python3: Do not hardcode "lib" for distutils
Get the sys.lib from python3 itself and do not use
hardcoded value of 'lib' for distutils.
Solve the error below that occurs when run "python3 setup.py
install"
on lib64 multilib platform:
[Errno 2] No such file or directory:
'/usr/lib/python3.7/site-packages/test-easy-install-1828.write-test'
(From OE-Core rev: fb33127de5d80f5bcb84edf6cf4007bca73fa863)
Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/python/python3/0001-python3-Do-not-hardcode-lib-for-distutils.patch | 43 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3_3.8.1.bb | 1 |
2 files changed, 44 insertions, 0 deletions
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 new file mode 100644 index 0000000000..fe031b9983 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-python3-Do-not-hardcode-lib-for-distutils.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From bb711b53f10d32a90a27ccf4b0dc51e4a701d862 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Fri, 7 Feb 2020 09:42:09 +0800 | ||
4 | Subject: [PATCH] python3: Do not hardcode "lib" for distutils | ||
5 | |||
6 | Get the sys.lib from python3 itself and do not use | ||
7 | hardcoded value of 'lib' for distutils. | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe-core specific] | ||
10 | |||
11 | Signed-off-by: Li Zhou <li.zhou@windriver.com> | ||
12 | Signed-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 | |||
17 | diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py | ||
18 | index 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 | -- | ||
42 | 2.7.4 | ||
43 | |||
diff --git a/meta/recipes-devtools/python/python3_3.8.1.bb b/meta/recipes-devtools/python/python3_3.8.1.bb index 981b52e169..c836066215 100644 --- a/meta/recipes-devtools/python/python3_3.8.1.bb +++ b/meta/recipes-devtools/python/python3_3.8.1.bb | |||
@@ -30,6 +30,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ | |||
30 | file://0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \ | 30 | file://0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \ |
31 | file://0001-Makefile-do-not-compile-.pyc-in-parallel.patch \ | 31 | file://0001-Makefile-do-not-compile-.pyc-in-parallel.patch \ |
32 | file://0001-configure.ac-fix-LIBPL.patch \ | 32 | file://0001-configure.ac-fix-LIBPL.patch \ |
33 | file://0001-python3-Do-not-hardcode-lib-for-distutils.patch \ | ||
33 | " | 34 | " |
34 | 35 | ||
35 | SRC_URI_append_class-native = " \ | 36 | SRC_URI_append_class-native = " \ |