diff options
author | Yu Ke <ke.yu@intel.com> | 2011-07-11 15:23:18 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-12 14:55:23 +0100 |
commit | ab4ae436126f20b404375c9ae77cf66cfe31ea34 (patch) | |
tree | 93f6fdaa5ffb98f3449f4419593c09993f8da019 /meta/recipes-devtools/python/python-native | |
parent | c97ab268d6a7092a89c8b0051924a2acc2d86d9c (diff) | |
download | openembedded-core-ab4ae436126f20b404375c9ae77cf66cfe31ea34.tar.gz openembedded-core-ab4ae436126f20b404375c9ae77cf66cfe31ea34.tar.bz2 openembedded-core-ab4ae436126f20b404375c9ae77cf66cfe31ea34.zip |
python-native: fix for non /usr/lib libdir case
the get_python_lib() use hard code "lib". when other recipe
building use python-native, the STAGING_LIBDIR is non /usr/lib,
so the hard code "lib" will break the build
This patch replace the hardcoded "lib" with value from libdir
to fix this issue.
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python-native')
-rw-r--r-- | meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch | 15 |
1 files changed, 11 insertions, 4 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 index 9532eb3ad9..8e721fe002 100644 --- 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 @@ -30,19 +30,26 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py if os.name == "posix": if python_build: -@@ -116,7 +119,10 @@ def get_python_lib(plat_specific=0, stan +@@ -115,12 +118,16 @@ def get_python_lib(plat_specific=0, stan + If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ ++ lib_basename = os.getenv("libdir").split('/')[-1] 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') ++ prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip(lib_basename) + 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(): +- "lib", "python" + get_python_version()) ++ lib_basename, "python" + get_python_version()) + if standard_lib: + return libpython + else: +@@ -216,7 +223,7 @@ def get_config_h_filename(): else: # The name of the config.h file changed in 2.2 config_h = 'pyconfig.h' @@ -51,7 +58,7 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py def get_makefile_filename(): -@@ -225,7 +231,7 @@ def get_makefile_filename(): +@@ -225,7 +232,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) |