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 <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2016-04-06 17:58:36 +03:00
committed by Richard Purdie
parent 49557a5e9d
commit 4977a0743b
19 changed files with 62 additions and 167 deletions

View File

@@ -0,0 +1,51 @@
From 4cdf2e9df13c6327fcc94d53e4953005543aef3d Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
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 <mickey@vanille-media.de>
Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
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