aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python
diff options
context:
space:
mode:
authorTyler Hall <tylerwhall@gmail.com>2014-05-04 20:06:43 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-08 12:56:40 +0100
commit7b2ffd68ae8235dcc3ddff9cbe8525e61f3b3d28 (patch)
treec93470879ddc0975d5fbb4001a97195f6fa507d2 /meta/recipes-devtools/python
parent23849347d0fe60a01578efdd6c6e23ebb444dcd6 (diff)
downloadopenembedded-core-contrib-7b2ffd68ae8235dcc3ddff9cbe8525e61f3b3d28.tar.gz
python3: Revert python-config to distutils.sysconfig
The newer sysconfig module shares some code with distutils.sysconfig, but the same modifications as in 12-distutils-prefix-is-inside-staging-area.patch makes distutils.sysconfig affect the native runtime as well as cross building. Use the old, patched implementation which returns paths in the staging directory and for the target, as appropriate. This change reverts this upstream patch http://hg.python.org/cpython/diff/712970b019f7/Misc/python-config.in Signed-off-by: Tyler Hall <tylerwhall@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/python')
-rw-r--r--meta/recipes-devtools/python/python3-native_3.3.3.bb1
-rw-r--r--meta/recipes-devtools/python/python3/python-config.patch46
-rw-r--r--meta/recipes-devtools/python/python3_3.3.3.bb1
3 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-native_3.3.3.bb b/meta/recipes-devtools/python/python3-native_3.3.3.bb
index 0fd73498e8..9ae2a0b373 100644
--- a/meta/recipes-devtools/python/python3-native_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3-native_3.3.3.bb
@@ -6,6 +6,7 @@ DISTRO_SRC_URI ?= "file://sitecustomize.py"
DISTRO_SRC_URI_linuxstdbase = ""
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
file://12-distutils-prefix-is-inside-staging-area.patch \
+file://python-config.patch \
file://000-cross-compile.patch \
file://020-dont-compile-python-files.patch \
file://030-fixup-include-dirs.patch \
diff --git a/meta/recipes-devtools/python/python3/python-config.patch b/meta/recipes-devtools/python/python3/python-config.patch
new file mode 100644
index 0000000000..f23b8b7df0
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/python-config.patch
@@ -0,0 +1,46 @@
+python-config: Revert to using distutils.sysconfig
+
+The newer sysconfig module shares some code with distutils.sysconfig, but the same modifications as in
+
+12-distutils-prefix-is-inside-staging-area.patch makes distutils.sysconfig
+
+affect the native runtime as well as cross building. Use the old, patched
+implementation which returns paths in the staging directory and for the target,
+as appropriate.
+
+Upstream-Status: Inappropriate [Embedded Specific]
+
+Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
+:
+Index: Python-3.3.3/Misc/python-config.in
+===================================================================
+--- Python-3.3.3.orig/Misc/python-config.in
++++ Python-3.3.3/Misc/python-config.in
+@@ -4,7 +4,7 @@
+ import getopt
+ import os
+ import sys
+-import sysconfig
++from distutils import sysconfig
+
+ valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
+ 'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir']
+@@ -32,14 +32,14 @@ if '--help' in opt_flags:
+
+ for opt in opt_flags:
+ if opt == '--prefix':
+- print(sysconfig.get_config_var('prefix'))
++ print(sysconfig.PREFIX)
+
+ elif opt == '--exec-prefix':
+- print(sysconfig.get_config_var('exec_prefix'))
++ print(sysconfig.EXEC_PREFIX)
+
+ elif opt in ('--includes', '--cflags'):
+- flags = ['-I' + sysconfig.get_path('include'),
+- '-I' + sysconfig.get_path('platinclude')]
++ flags = ['-I' + sysconfig.get_python_inc(),
++ '-I' + sysconfig.get_python_inc(plat_specific=True)]
+ if opt == '--cflags':
+ flags.extend(getvar('CFLAGS').split())
+ print(' '.join(flags))
diff --git a/meta/recipes-devtools/python/python3_3.3.3.bb b/meta/recipes-devtools/python/python3_3.3.3.bb
index c357bbb07e..a1cb12078f 100644
--- a/meta/recipes-devtools/python/python3_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3_3.3.3.bb
@@ -8,6 +8,7 @@ DISTRO_SRC_URI ?= "file://sitecustomize.py"
DISTRO_SRC_URI_linuxstdbase = ""
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
file://12-distutils-prefix-is-inside-staging-area.patch \
+file://python-config.patch \
file://000-cross-compile.patch \
file://020-dont-compile-python-files.patch \
file://030-fixup-include-dirs.patch \