From 8834e81a38c24a066bb4fefa93da61011d0db244 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 6 Apr 2016 17:58:36 +0300 Subject: python-native, python3-native: remove the use of exported HOST_SYS and BUILD_SYS variables The code that utilized them was superseded by the code (in the same patch!) that is utilizing STAGING_LIBDIR/STAGING_INCDIR, and wasn't correct in the first place as HOST_SYS is not necessarily the same as the sysroot directory name. Signed-off-by: Alexander Kanavin --- ...2-distutils-prefix-is-inside-staging-area.patch | 49 ++++------------------ 1 file changed, 9 insertions(+), 40 deletions(-) (limited to 'meta/recipes-devtools/python/python3') diff --git a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch index 8b93c1cf4f..c53ec0cfc8 100644 --- a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch +++ b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch @@ -1,4 +1,4 @@ -From d4dd67daa1555bf13272cc071706338572539bad Mon Sep 17 00:00:00 2001 +From 7630ab22578746d3d790d0598c0d279cf7afed97 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 14 May 2013 15:00:26 -0700 Subject: [PATCH 01/20] python3: Add target and native recipes @@ -14,27 +14,14 @@ Upstream-Status: Inappropriate [embedded specific] # Signed-off-by: Alejandro Hernandez --- + Lib/distutils/sysconfig.py | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index 573724d..418b478 100644 +index 573724d..390c485 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py -@@ -17,10 +17,11 @@ import sys - from .errors import DistutilsPlatformError - - # These are needed in a couple of spots, so just compute them once. --PREFIX = os.path.normpath(sys.prefix) --EXEC_PREFIX = os.path.normpath(sys.exec_prefix) --BASE_PREFIX = os.path.normpath(sys.base_prefix) --BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) -+PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) -+EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) -+BASE_PREFIX = os.path.normpath(sys.base_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) -+BASE_EXEC_PREFIX= os.path.normpath(sys.base_exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) -+ - - # Path to the base directory of the project. On Windows the binary may - # live in project/PCBuild/win32 or project/PCBuild/amd64. -@@ -84,7 +85,9 @@ def get_python_inc(plat_specific=0, prefix=None): +@@ -84,7 +84,9 @@ def get_python_inc(plat_specific=0, prefix=None): If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ @@ -45,7 +32,7 @@ index 573724d..418b478 100644 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX if os.name == "posix": if python_build: -@@ -125,6 +128,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): +@@ -125,6 +127,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ @@ -56,7 +43,7 @@ index 573724d..418b478 100644 if prefix is None: if standard_lib: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX -@@ -133,7 +140,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): +@@ -133,7 +139,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): if os.name == "posix": libpython = os.path.join(prefix, @@ -65,24 +52,6 @@ index 573724d..418b478 100644 if standard_lib: return libpython else: -@@ -233,7 +240,7 @@ def get_config_h_filename(): - else: - inc_dir = get_python_inc(plat_specific=1) - -- return os.path.join(inc_dir, 'pyconfig.h') -+ return os.path.join(inc_dir, 'pyconfig.h'.replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )) - - - def get_makefile_filename(): -@@ -242,7 +249,7 @@ def get_makefile_filename(): - return os.path.join(_sys_home or project_base, "Makefile") - lib_dir = get_python_lib(plat_specific=0, standard_lib=1) - config_file = 'config-{}{}'.format(get_python_version(), build_flags) -- return os.path.join(lib_dir, config_file, 'Makefile') -+ return os.path.join(lib_dir, config_file, 'Makefile').replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) - - - def parse_config_h(fp, g=None): -- -2.7.0 +2.8.0.rc3 -- cgit 1.2.3-korg