python3: fix multilib in distutils
PATCH 1/1 python3: fix multilib in distutils
From: Dan McGregor <[email protected]>
Update the multilib patch to also use sys.lib in distutils.
Signed-off-by Dan McGregor <[email protected]>
--- meta/recipes-devtools/python/python3-native_3.5.3.bb | 2 +- .../12-distutils-prefix-is-inside-staging-area.patch | 10 +++++----- .../python/python3/python-3.3-multilib.patch | 17 ++++++++++++++++- 3 files changed, 22 insertions(+), 7 deletions(-)
meta/recipes-devtools/python/python3-native_3.5.3.bb +1 -1
@@ -5,7 +5,6 @@ PYTHON_MAJMIN = "3.5" DISTRO_SRC_URI ?= "file://sitecustomize.py" DISTRO_SRC_URI_linuxstdbase = "" SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ -file://12-distutils-prefix-is-inside-staging-area.patch \ file://python-config.patch \ file://0001-cross-compile-support.patch \ file://030-fixup-include-dirs.patch \
@@ -14,6 +13,7 @@ file://080-distutils-dont_adjust_files.patch \ file://130-readline-setup.patch \ file://150-fix-setupterm.patch \ file://python-3.3-multilib.patch \ +file://12-distutils-prefix-is-inside-staging-area.patch \ file://03-fix-tkinter-detection.patch \ file://avoid_warning_about_tkinter.patch \ file://shutil-follow-symlink-fix.patch \
meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch +5 -5
@@ -18,7 +18,7 @@ Upstream-Status: Inappropriate [embedded specific] 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index 573724d..390c485 100644 +index 217ec94c37..a55e722fed 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -84,7 +84,9 @@ def get_python_inc(plat_specific=0, prefix=None):
@@ -43,12 +43,12 @@ index 573724d..390c485 100644 if prefix is None: if standard_lib: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX -@@ -133,7 +139,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): +@@ -132,7 +138,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): + prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": - libpython = os.path.join(prefix, -- "lib", "python" + get_python_version()) -+ lib_basename, "python" + get_python_version()) +- libpython = os.path.join(prefix, sys.lib, "python" + get_python_version()) ++ libpython = os.path.join(prefix, lib_basename, "python" + get_python_version()) if standard_lib: return libpython else:
meta/recipes-devtools/python/python3/python-3.3-multilib.patch +16 -1
@@ -13,6 +13,7 @@ Signed-off-by: Alejandro Hernandez <[email protected]> --- Include/pythonrun.h | 3 +++ Lib/distutils/command/install.py | 4 +++- + Lib/distutils/sysconfig.py | 3 +-- Lib/pydoc.py | 2 +- Lib/site.py | 4 ++-- Lib/sysconfig.py | 18 +++++++++---------
@@ -23,7 +24,7 @@ Signed-off-by: Alejandro Hernandez <[email protected]> Python/sysmodule.c | 4 ++++ configure.ac | 35 +++++++++++++++++++++++++++++++++++ setup.py | 9 ++++----- - 12 files changed, 97 insertions(+), 23 deletions(-) + 13 files changed, 98 insertions(+), 25 deletions(-) diff --git a/Include/pythonrun.h b/Include/pythonrun.h index 9c2e813..2f79cb6 100644
@@ -61,6 +62,20 @@ index 67db007..b46b45b 100644 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', 'scripts': '$base/bin', 'data' : '$base', +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 573724ddd7..217ec94c37 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -132,8 +132,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): + prefix = plat_specific and EXEC_PREFIX or PREFIX + + if os.name == "posix": +- libpython = os.path.join(prefix, +- "lib", "python" + get_python_version()) ++ libpython = os.path.join(prefix, sys.lib, "python" + get_python_version()) + if standard_lib: + return libpython + else: diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 3ca08c9..6528730 100755 --- a/Lib/pydoc.py
Signature · 1 line
2.14.1
Quoted 5 lines · Dan McGregor
From: Dan McGregor <[email protected]>
Update the multilib patch to also use sys.lib in distutils.
Signed-off-by Dan McGregor <[email protected]>
This patch makes two different recipe patches modify the same line twice. Can you squash that into a single change so that it's clear what is being changed, and what is the final state. Also, please do provide an explanation in the commit message: why the original code is incorrect, and why the new one is correct.
Alex