summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2010-11-08 10:34:46 -0800
committerSaul Wold <sgw@linux.intel.com>2010-11-14 21:08:26 -0800
commit793bb465b3a6b0c883340621575b9944d7ccaf5a (patch)
treeb668cfadf3836b3d018dd76005f3bb65b4f8dd03 /meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
parenta7af5c516e547e669d92569dba21a9c1c790cf7f (diff)
downloadast2050-yocto-poky-793bb465b3a6b0c883340621575b9944d7ccaf5a.zip
ast2050-yocto-poky-793bb465b3a6b0c883340621575b9944d7ccaf5a.tar.gz
python, python-native upgrade from 2.6.5 to 2.6.6
Removed these patch: python-native-2.6.5/00-fix-bindir-libdir-for-cross.patch python/00-fix-bindir-libdir-for-cross.patch The upstream code has changed, and it does not need the above 2 patches (fixes) anymore. Patches rebased to the newer code: python/01-use-proper-tools-for-cross-build.patch python/04-default-is-optimized.patch python/06-avoid_usr_lib_termcap_path_in_linking.patch python/99-ignore-optimization-flag.patch Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Diffstat (limited to 'meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch')
-rw-r--r--meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
new file mode 100644
index 0000000..bf4366f
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
@@ -0,0 +1,60 @@
+# The proper prefix is inside our staging area.
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+
+Index: Python-2.6.6/Lib/distutils/sysconfig.py
+===================================================================
+--- Python-2.6.6.orig/Lib/distutils/sysconfig.py
++++ Python-2.6.6/Lib/distutils/sysconfig.py
+@@ -19,8 +19,8 @@ import sys
+ from distutils.errors import DistutilsPlatformError
+
+ # These are needed in a couple of spots, so just compute them once.
+-PREFIX = os.path.normpath(sys.prefix)
+-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
++PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
++EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
+
+ # Path to the base directory of the project. On Windows the binary may
+ # live in project/PCBuild9. If we're dealing with an x64 Windows build,
+@@ -70,7 +70,10 @@ def get_python_inc(plat_specific=0, pref
+ sys.exec_prefix -- i.e., ignore 'plat_specific'.
+ """
+ if prefix is None:
+- prefix = plat_specific and EXEC_PREFIX or PREFIX
++ if plat_specific:
++ prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include')
++ else:
++ prefix = plat_specific and EXEC_PREFIX or PREFIX
+
+ if os.name == "posix":
+ if python_build:
+@@ -116,7 +119,10 @@ def get_python_lib(plat_specific=0, stan
+ sys.exec_prefix -- i.e., ignore 'plat_specific'.
+ """
+ if prefix is None:
+- prefix = plat_specific and EXEC_PREFIX or PREFIX
++ if plat_specific:
++ prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip('lib')
++ else:
++ prefix = plat_specific and EXEC_PREFIX or PREFIX
+
+ if os.name == "posix":
+ libpython = os.path.join(prefix,
+@@ -216,7 +222,7 @@ def get_config_h_filename():
+ else:
+ # The name of the config.h file changed in 2.2
+ config_h = 'pyconfig.h'
+- return os.path.join(inc_dir, config_h)
++ return os.path.join(inc_dir, config_h).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
+
+
+ def get_makefile_filename():
+@@ -225,7 +231,7 @@ def get_makefile_filename():
+ return os.path.join(os.path.dirname(os.path.realpath(sys.executable)),
+ "Makefile")
+ lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
+- return os.path.join(lib_dir, "config", "Makefile")
++ return os.path.join(lib_dir, "config", "Makefile").replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
+
+
+ def parse_config_h(fp, g=None):
OpenPOWER on IntegriCloud