summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-native-2.6.5/12-distutils-prefix-is-inside-staging-area.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python-native-2.6.5/12-distutils-prefix-is-inside-staging-area.patch')
-rw-r--r--meta/recipes-devtools/python/python-native-2.6.5/12-distutils-prefix-is-inside-staging-area.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-native-2.6.5/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python-native-2.6.5/12-distutils-prefix-is-inside-staging-area.patch
new file mode 100644
index 0000000000..aa4393679f
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/12-distutils-prefix-is-inside-staging-area.patch
@@ -0,0 +1,60 @@
1# The proper prefix is inside our staging area.
2# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
3
4Index: Python-2.6.1/Lib/distutils/sysconfig.py
5===================================================================
6--- Python-2.6.1.orig/Lib/distutils/sysconfig.py
7+++ Python-2.6.1/Lib/distutils/sysconfig.py
8@@ -19,8 +19,8 @@ import sys
9 from distutils.errors import DistutilsPlatformError
10
11 # These are needed in a couple of spots, so just compute them once.
12-PREFIX = os.path.normpath(sys.prefix)
13-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
14+PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
15+EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
16
17 # Path to the base directory of the project. On Windows the binary may
18 # live in project/PCBuild9. If we're dealing with an x64 Windows build,
19@@ -70,7 +70,10 @@ def get_python_inc(plat_specific=0, pref
20 sys.exec_prefix -- i.e., ignore 'plat_specific'.
21 """
22 if prefix is None:
23- prefix = plat_specific and EXEC_PREFIX or PREFIX
24+ if plat_specific:
25+ prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include')
26+ else:
27+ prefix = plat_specific and EXEC_PREFIX or PREFIX
28 if os.name == "posix":
29 if python_build:
30 base = os.path.dirname(os.path.abspath(sys.executable))
31@@ -112,7 +115,10 @@ def get_python_lib(plat_specific=0, stan
32 sys.exec_prefix -- i.e., ignore 'plat_specific'.
33 """
34 if prefix is None:
35- prefix = plat_specific and EXEC_PREFIX or PREFIX
36+ if plat_specific:
37+ prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip('lib')
38+ else:
39+ prefix = plat_specific and EXEC_PREFIX or PREFIX
40
41 if os.name == "posix":
42 libpython = os.path.join(prefix,
43@@ -218,7 +218,7 @@ def get_config_h_filename():
44 else:
45 # The name of the config.h file changed in 2.2
46 config_h = 'pyconfig.h'
47- return os.path.join(inc_dir, config_h)
48+ return os.path.join(inc_dir, config_h).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
49
50
51 def get_makefile_filename():
52@@ -226,7 +226,7 @@ def get_makefile_filename():
53 if python_build:
54 return os.path.join(os.path.dirname(sys.executable), "Makefile")
55 lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
56- return os.path.join(lib_dir, "config", "Makefile")
57+ return os.path.join(lib_dir, "config", "Makefile").replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
58
59
60 def parse_config_h(fp, g=None):