From 4977a0743ba439a46716c6ef10c5958d5a561115 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. (From OE-Core rev: 8834e81a38c24a066bb4fefa93da61011d0db244) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- ...et-the-prefix-to-be-inside-staging-direct.patch | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch (limited to 'meta/recipes-devtools/python/python') diff --git a/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch b/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch new file mode 100644 index 0000000000..502f849804 --- /dev/null +++ b/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch @@ -0,0 +1,51 @@ +From 4cdf2e9df13c6327fcc94d53e4953005543aef3d Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 6 Apr 2016 17:43:02 +0300 +Subject: [PATCH 01/10] distutils: set the prefix to be inside staging + directory + +The proper prefix is inside our staging area. + +Upstream-Status: Inappropriate [embedded specific] +Signed-off-by: Michael 'Mickey' Lauer +Signed-off-by: Phil Blundell +Signed-off-by: Alexander Kanavin +--- + Lib/distutils/sysconfig.py | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index de7da1d..f3aacf7 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -75,7 +75,7 @@ def get_python_inc(plat_specific=0, prefix=None): + sys.exec_prefix -- i.e., ignore 'plat_specific'. + """ + if prefix is None: +- prefix = plat_specific and EXEC_PREFIX or PREFIX ++ prefix = os.environ['STAGING_INCDIR'].rstrip('include') + + if os.name == "posix": + if python_build: +@@ -115,12 +115,16 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): + If 'prefix' is supplied, use it instead of sys.prefix or + sys.exec_prefix -- i.e., ignore 'plat_specific'. + """ ++ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1] + if prefix is None: +- prefix = plat_specific and EXEC_PREFIX or PREFIX ++ if plat_specific: ++ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename) ++ else: ++ prefix = PREFIX + + if os.name == "posix": + libpython = os.path.join(prefix, +- "lib", "python" + get_python_version()) ++ lib_basename, "python" + get_python_version()) + if standard_lib: + return libpython + else: +-- +2.8.0.rc3 + -- cgit v1.2.3-54-g00ecf