From b7a5901dd6c7ffa1b277d216c9b684b06137d852 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Fri, 7 Feb 2020 14:07:44 +0800 Subject: 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 Signed-off-by: Changqing Li Signed-off-by: Richard Purdie --- ...python3-Do-not-hardcode-lib-for-distutils.patch | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 meta/recipes-devtools/python/python3/0001-python3-Do-not-hardcode-lib-for-distutils.patch (limited to 'meta/recipes-devtools/python/python3') 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 @@ +From bb711b53f10d32a90a27ccf4b0dc51e4a701d862 Mon Sep 17 00:00:00 2001 +From: Changqing Li +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 +Signed-off-by: Changqing Li +--- + 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 + -- cgit v1.2.3-54-g00ecf