summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-09-11 13:30:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-16 23:02:44 +0100
commitd5a00f509a573357476bacd298fac6d1a1dc6a24 (patch)
tree101c71f38b4dc268658c36563fb3f1997e3e9ec9 /meta/recipes-devtools
parentf58498f668f50b12484a871150d51f98e813dd2c (diff)
downloadpoky-d5a00f509a573357476bacd298fac6d1a1dc6a24.tar.gz
python3: handle STAGING_LIBDIR/INCDIR being unset
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch28
1 files changed, 16 insertions, 12 deletions
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 35213171bd..0bafec73c0 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 @@
1From 12900d498bb77bcc990868a80eaf0ab257b88fff Mon Sep 17 00:00:00 2001 1From 6229502e5ae6cbb22240594f002638e9ef78f831 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 14 May 2013 15:00:26 -0700 3Date: Tue, 14 May 2013 15:00:26 -0700
4Subject: [PATCH] python3: Add target and native recipes 4Subject: [PATCH] python3: Add target and native recipes
@@ -14,36 +14,40 @@ Upstream-Status: Inappropriate [embedded specific]
14# Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> 14# Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
15 15
16--- 16---
17 Lib/distutils/sysconfig.py | 10 ++++++++-- 17 Lib/distutils/sysconfig.py | 14 +++++++++++---
18 1 file changed, 8 insertions(+), 2 deletions(-) 18 1 file changed, 11 insertions(+), 3 deletions(-)
19 19
20diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py 20diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
21index 6b8c129..3ca7f79 100644 21index 3dfd0a3..6c6b09a 100644
22--- a/Lib/distutils/sysconfig.py 22--- a/Lib/distutils/sysconfig.py
23+++ b/Lib/distutils/sysconfig.py 23+++ b/Lib/distutils/sysconfig.py
24@@ -84,7 +84,9 @@ def get_python_inc(plat_specific=0, prefix=None): 24@@ -97,7 +97,9 @@ def get_python_inc(plat_specific=0, prefix=None):
25 If 'prefix' is supplied, use it instead of sys.base_prefix or 25 If 'prefix' is supplied, use it instead of sys.base_prefix or
26 sys.base_exec_prefix -- i.e., ignore 'plat_specific'. 26 sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
27 """ 27 """
28- if prefix is None: 28- if prefix is None:
29+ if prefix is None and os.environ['STAGING_INCDIR'] != "": 29+ if prefix is None and os.environ.get('STAGING_INCDIR', ""):
30+ prefix = os.environ['STAGING_INCDIR'].rstrip('include') 30+ prefix = os.environ['STAGING_INCDIR'].rstrip('include')
31+ elif prefix is None: 31+ elif prefix is None:
32 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX 32 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
33 if os.name == "posix": 33 if os.name == "posix":
34 if python_build: 34 if python_build:
35@@ -122,6 +124,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): 35@@ -140,7 +142,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
36 If 'prefix' is supplied, use it instead of sys.base_prefix or 36 If 'prefix' is supplied, use it instead of sys.base_prefix or
37 sys.base_exec_prefix -- i.e., ignore 'plat_specific'. 37 sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
38 """ 38 """
39+ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1] 39- if prefix is None:
40+ if prefix is None and os.environ['STAGING_LIBDIR'] != "": 40+ if os.environ.get('STAGING_LIBDIR', ""):
41+ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
42+ else:
43+ lib_basename = "lib"
44+ if prefix is None and os.environ.get('STAGING_LIBDIR', ""):
41+ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename) 45+ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
42+ 46+ elif prefix is None:
43 if prefix is None:
44 if standard_lib: 47 if standard_lib:
45 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX 48 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
46@@ -130,7 +136,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): 49 else:
50@@ -148,7 +156,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
47 51
48 if os.name == "posix": 52 if os.name == "posix":
49 libpython = os.path.join(prefix, 53 libpython = os.path.join(prefix,