blob: fe031b9983425e5af8119823bae0633e98dd4ca3 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001From 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