diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch')
-rw-r--r-- | meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch | 50 |
1 files changed, 27 insertions, 23 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 dcc0932c7f..de4c6c4e19 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 @@ -From 1397979ee445ff6826aa5469511e003539f77bb2 Mon Sep 17 00:00:00 2001 +From 33b5a31df6050110f4481a24f5a0a0bf7fe80096 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Tue, 14 May 2013 15:00:26 -0700 Subject: [PATCH] python3: Add target and native recipes @@ -7,48 +7,52 @@ Upstream-Status: Inappropriate [embedded specific] 02/2015 Rebased for Python 3.4.2 -# The proper prefix is inside our staging area. -# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> -# Signed-off-by: Phil Blundell <philb@gnu.org> -# Signed-off-by: Khem Raj <raj.khem@gmail.com> -# Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> +The proper prefix is inside our staging area. +Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> +Signed-off-by: Phil Blundell <philb@gnu.org> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> --- - Lib/distutils/sysconfig.py | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) + Lib/distutils/sysconfig.py | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index 6b8c129..3ca7f79 100644 +index 3414a76..361d3a1 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py -@@ -84,7 +84,9 @@ def get_python_inc(plat_specific=0, prefix=None): +@@ -277,7 +277,9 @@ def get_python_inc(plat_specific=0, prefix=None): If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ - if prefix is None: -+ if prefix is None and os.environ['STAGING_INCDIR'] != "": ++ if prefix is None and os.environ.get('STAGING_INCDIR', ""): + prefix = os.environ['STAGING_INCDIR'].rstrip('include') + elif prefix is None: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX if os.name == "posix": if python_build: -@@ -122,6 +124,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): +@@ -320,7 +322,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ -+ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1] -+ if prefix is None and os.environ['STAGING_LIBDIR'] != "": +- if prefix is None: ++ if os.environ.get('STAGING_LIBDIR', ""): ++ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1] ++ else: ++ lib_basename = "lib" ++ if prefix is None and os.environ.get('STAGING_LIBDIR', ""): + prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename) -+ - if prefix is None: ++ elif prefix is None: if standard_lib: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX -@@ -130,7 +136,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): - - if os.name == "posix": - libpython = os.path.join(prefix, -- "lib", "python" + get_python_version()) -+ lib_basename, "python" + get_python_version()) + else: +@@ -334,7 +342,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): + else: + # Pure Python + libdir = "lib" +- libpython = os.path.join(prefix, libdir, ++ libpython = os.path.join(prefix, lib_basename, + "python" + get_python_version()) if standard_lib: return libpython - else: |