diff options
author | Tyler Hall <tylerwhall@gmail.com> | 2014-05-04 20:06:43 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-08 13:00:32 +0100 |
commit | 28798f196360f76e0edba4d8057f863ec0318fd3 (patch) | |
tree | 4d6f40ca33ba2c080c0767dadbe8d49572ca85b5 /meta/recipes-devtools/python | |
parent | bb07e85810d93ca6019ef317bcf3bf794c968a6b (diff) | |
download | poky-28798f196360f76e0edba4d8057f863ec0318fd3.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
(From OE-Core rev: 7b2ffd68ae8235dcc3ddff9cbe8525e61f3b3d28)
Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python')
-rw-r--r-- | meta/recipes-devtools/python/python3-native_3.3.3.bb | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3/python-config.patch | 46 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3_3.3.3.bb | 1 |
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" | |||
6 | DISTRO_SRC_URI_linuxstdbase = "" | 6 | DISTRO_SRC_URI_linuxstdbase = "" |
7 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ | 7 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ |
8 | file://12-distutils-prefix-is-inside-staging-area.patch \ | 8 | file://12-distutils-prefix-is-inside-staging-area.patch \ |
9 | file://python-config.patch \ | ||
9 | file://000-cross-compile.patch \ | 10 | file://000-cross-compile.patch \ |
10 | file://020-dont-compile-python-files.patch \ | 11 | file://020-dont-compile-python-files.patch \ |
11 | file://030-fixup-include-dirs.patch \ | 12 | 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 @@ | |||
1 | python-config: Revert to using distutils.sysconfig | ||
2 | |||
3 | The newer sysconfig module shares some code with distutils.sysconfig, but the same modifications as in | ||
4 | |||
5 | 12-distutils-prefix-is-inside-staging-area.patch makes distutils.sysconfig | ||
6 | |||
7 | affect the native runtime as well as cross building. Use the old, patched | ||
8 | implementation which returns paths in the staging directory and for the target, | ||
9 | as appropriate. | ||
10 | |||
11 | Upstream-Status: Inappropriate [Embedded Specific] | ||
12 | |||
13 | Signed-off-by: Tyler Hall <tylerwhall@gmail.com> | ||
14 | : | ||
15 | Index: Python-3.3.3/Misc/python-config.in | ||
16 | =================================================================== | ||
17 | --- Python-3.3.3.orig/Misc/python-config.in | ||
18 | +++ Python-3.3.3/Misc/python-config.in | ||
19 | @@ -4,7 +4,7 @@ | ||
20 | import getopt | ||
21 | import os | ||
22 | import sys | ||
23 | -import sysconfig | ||
24 | +from distutils import sysconfig | ||
25 | |||
26 | valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', | ||
27 | 'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir'] | ||
28 | @@ -32,14 +32,14 @@ if '--help' in opt_flags: | ||
29 | |||
30 | for opt in opt_flags: | ||
31 | if opt == '--prefix': | ||
32 | - print(sysconfig.get_config_var('prefix')) | ||
33 | + print(sysconfig.PREFIX) | ||
34 | |||
35 | elif opt == '--exec-prefix': | ||
36 | - print(sysconfig.get_config_var('exec_prefix')) | ||
37 | + print(sysconfig.EXEC_PREFIX) | ||
38 | |||
39 | elif opt in ('--includes', '--cflags'): | ||
40 | - flags = ['-I' + sysconfig.get_path('include'), | ||
41 | - '-I' + sysconfig.get_path('platinclude')] | ||
42 | + flags = ['-I' + sysconfig.get_python_inc(), | ||
43 | + '-I' + sysconfig.get_python_inc(plat_specific=True)] | ||
44 | if opt == '--cflags': | ||
45 | flags.extend(getvar('CFLAGS').split()) | ||
46 | 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" | |||
8 | DISTRO_SRC_URI_linuxstdbase = "" | 8 | DISTRO_SRC_URI_linuxstdbase = "" |
9 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ | 9 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ |
10 | file://12-distutils-prefix-is-inside-staging-area.patch \ | 10 | file://12-distutils-prefix-is-inside-staging-area.patch \ |
11 | file://python-config.patch \ | ||
11 | file://000-cross-compile.patch \ | 12 | file://000-cross-compile.patch \ |
12 | file://020-dont-compile-python-files.patch \ | 13 | file://020-dont-compile-python-files.patch \ |
13 | file://030-fixup-include-dirs.patch \ | 14 | file://030-fixup-include-dirs.patch \ |