diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch | 66 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3_3.5.3.bb | 1 |
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 @@ | |||
1 | From bcddbf40c7f1b80336268cdddacc17369fb0ccea Mon Sep 17 00:00:00 2001 | ||
2 | From: Libin Dang <libin.dang@windriver.com> | ||
3 | Date: Tue, 11 Apr 2017 14:12:15 +0800 | ||
4 | Subject: [PATCH] Issue #21272: Use _sysconfigdata.py to initialize | ||
5 | distutils.sysconfig | ||
6 | |||
7 | Backport upstream commit | ||
8 | https://github.com/python/cpython/commit/409482251b06fe75c4ee56e85ffbb4b23d934159 | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | |||
12 | Signed-off-by: Li Zhou <li.zhou@windriver.com> | ||
13 | --- | ||
14 | Lib/distutils/sysconfig.py | 35 ++++------------------------------- | ||
15 | 1 file changed, 4 insertions(+), 31 deletions(-) | ||
16 | |||
17 | diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py | ||
18 | index 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 | -- | ||
65 | 1.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 | " |
40 | SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21" | 41 | SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21" |
41 | SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0" | 42 | SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0" |