summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch35
1 files changed, 21 insertions, 14 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 bf02df2025..8b93c1cf4f 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,3 +1,8 @@
1From d4dd67daa1555bf13272cc071706338572539bad Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 14 May 2013 15:00:26 -0700
4Subject: [PATCH 01/20] python3: Add target and native recipes
5
1Upstream-Status: Inappropriate [embedded specific] 6Upstream-Status: Inappropriate [embedded specific]
2 7
302/2015 Rebased for Python 3.4.2 802/2015 Rebased for Python 3.4.2
@@ -8,11 +13,12 @@ Upstream-Status: Inappropriate [embedded specific]
8# Signed-off-by: Khem Raj <raj.khem@gmail.com> 13# Signed-off-by: Khem Raj <raj.khem@gmail.com>
9# Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> 14# Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
10 15
11Index: Python-3.4.2/Lib/distutils/sysconfig.py 16---
12=================================================================== 17diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
13--- Python-3.4.2.orig/Lib/distutils/sysconfig.py 18index 573724d..418b478 100644
14+++ Python-3.4.2/Lib/distutils/sysconfig.py 19--- a/Lib/distutils/sysconfig.py
15@@ -16,10 +16,11 @@ import sys 20+++ b/Lib/distutils/sysconfig.py
21@@ -17,10 +17,11 @@ import sys
16 from .errors import DistutilsPlatformError 22 from .errors import DistutilsPlatformError
17 23
18 # These are needed in a couple of spots, so just compute them once. 24 # These are needed in a couple of spots, so just compute them once.
@@ -27,8 +33,8 @@ Index: Python-3.4.2/Lib/distutils/sysconfig.py
27+ 33+
28 34
29 # Path to the base directory of the project. On Windows the binary may 35 # Path to the base directory of the project. On Windows the binary may
30 # live in project/PCBuild9. If we're dealing with an x64 Windows build, 36 # live in project/PCBuild/win32 or project/PCBuild/amd64.
31@@ -93,7 +94,9 @@ def get_python_inc(plat_specific=0, pref 37@@ -84,7 +85,9 @@ def get_python_inc(plat_specific=0, prefix=None):
32 If 'prefix' is supplied, use it instead of sys.base_prefix or 38 If 'prefix' is supplied, use it instead of sys.base_prefix or
33 sys.base_exec_prefix -- i.e., ignore 'plat_specific'. 39 sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
34 """ 40 """
@@ -39,20 +45,18 @@ Index: Python-3.4.2/Lib/distutils/sysconfig.py
39 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX 45 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
40 if os.name == "posix": 46 if os.name == "posix":
41 if python_build: 47 if python_build:
42@@ -134,6 +137,12 @@ def get_python_lib(plat_specific=0, stan 48@@ -125,6 +128,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
43 If 'prefix' is supplied, use it instead of sys.base_prefix or 49 If 'prefix' is supplied, use it instead of sys.base_prefix or
44 sys.base_exec_prefix -- i.e., ignore 'plat_specific'. 50 sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
45 """ 51 """
52+ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
46+ if prefix is None and os.environ['STAGING_LIBDIR'] != "": 53+ if prefix is None and os.environ['STAGING_LIBDIR'] != "":
47+ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
48+ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename) 54+ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
49+ else:
50+ lib_basename = sys.lib
51+ 55+
52 if prefix is None: 56 if prefix is None:
53 if standard_lib: 57 if standard_lib:
54 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX 58 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
55@@ -142,7 +151,7 @@ def get_python_lib(plat_specific=0, stan 59@@ -133,7 +140,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
56 60
57 if os.name == "posix": 61 if os.name == "posix":
58 libpython = os.path.join(prefix, 62 libpython = os.path.join(prefix,
@@ -61,7 +65,7 @@ Index: Python-3.4.2/Lib/distutils/sysconfig.py
61 if standard_lib: 65 if standard_lib:
62 return libpython 66 return libpython
63 else: 67 else:
64@@ -242,7 +251,7 @@ def get_config_h_filename(): 68@@ -233,7 +240,7 @@ def get_config_h_filename():
65 else: 69 else:
66 inc_dir = get_python_inc(plat_specific=1) 70 inc_dir = get_python_inc(plat_specific=1)
67 71
@@ -70,7 +74,7 @@ Index: Python-3.4.2/Lib/distutils/sysconfig.py
70 74
71 75
72 def get_makefile_filename(): 76 def get_makefile_filename():
73@@ -251,7 +260,7 @@ def get_makefile_filename(): 77@@ -242,7 +249,7 @@ def get_makefile_filename():
74 return os.path.join(_sys_home or project_base, "Makefile") 78 return os.path.join(_sys_home or project_base, "Makefile")
75 lib_dir = get_python_lib(plat_specific=0, standard_lib=1) 79 lib_dir = get_python_lib(plat_specific=0, standard_lib=1)
76 config_file = 'config-{}{}'.format(get_python_version(), build_flags) 80 config_file = 'config-{}{}'.format(get_python_version(), build_flags)
@@ -79,3 +83,6 @@ Index: Python-3.4.2/Lib/distutils/sysconfig.py
79 83
80 84
81 def parse_config_h(fp, g=None): 85 def parse_config_h(fp, g=None):
86--
872.7.0
88