summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorLi Zhou <li.zhou@windriver.com>2017-05-27 17:46:15 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-29 15:15:20 +0100
commit0862df262d7bd4b016a3fcb8a2f2fff7e0cd957b (patch)
tree956fbb01983464771b693e21b72a981a25e2fb1d /meta/recipes-devtools
parentc9f0e25a16e8cf88dc859a712a20d30b5b657771 (diff)
downloadpoky-0862df262d7bd4b016a3fcb8a2f2fff7e0cd957b.tar.gz
python3: Use _sysconfigdata.py to initialize distutils.sysconfig
Porting patch from <https://github.com/python/cpython/commit/409482251b06fe75c4ee56e85ffbb4b23d934159> to use _sysconfigdata.py to initialize distutils.sysconfig. This patch makes that distutils.sysconfig doesn't need config-*/Makefile in libdir any more. Next we can move it from python3-misc to python3-dev package. (From OE-Core rev: 659a80afc5894658f8b82fcd62ebe3562b441db9) Signed-off-by: Li Zhou <li.zhou@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch66
-rw-r--r--meta/recipes-devtools/python/python3_3.5.3.bb1
2 files changed, 67 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch b/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch
new file mode 100644
index 0000000000..d1c92e9eed
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch
@@ -0,0 +1,66 @@
1From bcddbf40c7f1b80336268cdddacc17369fb0ccea Mon Sep 17 00:00:00 2001
2From: Libin Dang <libin.dang@windriver.com>
3Date: Tue, 11 Apr 2017 14:12:15 +0800
4Subject: [PATCH] Issue #21272: Use _sysconfigdata.py to initialize
5 distutils.sysconfig
6
7Backport upstream commit
8https://github.com/python/cpython/commit/409482251b06fe75c4ee56e85ffbb4b23d934159
9
10Upstream-Status: Backport
11
12Signed-off-by: Li Zhou <li.zhou@windriver.com>
13---
14 Lib/distutils/sysconfig.py | 35 ++++-------------------------------
15 1 file changed, 4 insertions(+), 31 deletions(-)
16
17diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
18index 6d5cfd0..9925d24 100644
19--- a/Lib/distutils/sysconfig.py
20+++ b/Lib/distutils/sysconfig.py
21@@ -424,38 +424,11 @@ _config_vars = None
22
23 def _init_posix():
24 """Initialize the module as appropriate for POSIX systems."""
25- g = {}
26- # load the installed Makefile:
27- try:
28- filename = get_makefile_filename()
29- parse_makefile(filename, g)
30- except OSError as msg:
31- my_msg = "invalid Python installation: unable to open %s" % filename
32- if hasattr(msg, "strerror"):
33- my_msg = my_msg + " (%s)" % msg.strerror
34-
35- raise DistutilsPlatformError(my_msg)
36-
37- # load the installed pyconfig.h:
38- try:
39- filename = get_config_h_filename()
40- with open(filename) as file:
41- parse_config_h(file, g)
42- except OSError as msg:
43- my_msg = "invalid Python installation: unable to open %s" % filename
44- if hasattr(msg, "strerror"):
45- my_msg = my_msg + " (%s)" % msg.strerror
46-
47- raise DistutilsPlatformError(my_msg)
48-
49- # On AIX, there are wrong paths to the linker scripts in the Makefile
50- # -- these paths are relative to the Python source, but when installed
51- # the scripts are in another directory.
52- if python_build:
53- g['LDSHARED'] = g['BLDSHARED']
54-
55+ # _sysconfigdata is generated at build time, see the sysconfig module
56+ from _sysconfigdata import build_time_vars
57 global _config_vars
58- _config_vars = g
59+ _config_vars = {}
60+ _config_vars.update(build_time_vars)
61
62
63 def _init_nt():
64--
651.8.3.1
66
diff --git a/meta/recipes-devtools/python/python3_3.5.3.bb b/meta/recipes-devtools/python/python3_3.5.3.bb
index 3b3cfebbf4..d7c29f2f7d 100644
--- a/meta/recipes-devtools/python/python3_3.5.3.bb
+++ b/meta/recipes-devtools/python/python3_3.5.3.bb
@@ -36,6 +36,7 @@ SRC_URI += "\
36 file://setup.py-find-libraries-in-staging-dirs.patch \ 36 file://setup.py-find-libraries-in-staging-dirs.patch \
37 file://configure.ac-fix-LIBPL.patch \ 37 file://configure.ac-fix-LIBPL.patch \
38 file://upstream-random-fixes.patch \ 38 file://upstream-random-fixes.patch \
39 file://0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch \
39 " 40 "
40SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21" 41SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21"
41SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0" 42SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0"