python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / python3 / 0006-distutils-sysconfig-use-sysconfigdata.patch
blobf36966c79900a5ebcdaf37932faf109f13e0620c
1 From 5855e029370e5636e3eb2283eaa8d11248744eac Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Wed, 23 Dec 2015 11:32:23 +0100
4 Subject: [PATCH] distutils/sysconfig: use sysconfigdata
6 In order to make the use of sysconfig cross-compilation compatible,
7 use _sysconfigdata.
9 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 ---
11 Lib/distutils/sysconfig.py | 37 ++++---------------------------------
12 1 file changed, 4 insertions(+), 33 deletions(-)
14 diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
15 index 573724d..721edec 100644
16 --- a/Lib/distutils/sysconfig.py
17 +++ b/Lib/distutils/sysconfig.py
18 @@ -414,40 +414,11 @@ def expand_makefile_vars(s, vars):
19 _config_vars = None
21 def _init_posix():
22 - """Initialize the module as appropriate for POSIX systems."""
23 - g = {}
24 - # load the installed Makefile:
25 - try:
26 - filename = get_makefile_filename()
27 - parse_makefile(filename, g)
28 - except OSError as msg:
29 - my_msg = "invalid Python installation: unable to open %s" % filename
30 - if hasattr(msg, "strerror"):
31 - my_msg = my_msg + " (%s)" % msg.strerror
33 - raise DistutilsPlatformError(my_msg)
35 - # load the installed pyconfig.h:
36 - try:
37 - filename = get_config_h_filename()
38 - with open(filename) as file:
39 - parse_config_h(file, g)
40 - except OSError as msg:
41 - my_msg = "invalid Python installation: unable to open %s" % filename
42 - if hasattr(msg, "strerror"):
43 - my_msg = my_msg + " (%s)" % msg.strerror
45 - raise DistutilsPlatformError(my_msg)
47 - # On AIX, there are wrong paths to the linker scripts in the Makefile
48 - # -- these paths are relative to the Python source, but when installed
49 - # the scripts are in another directory.
50 - if python_build:
51 - g['LDSHARED'] = g['BLDSHARED']
53 + # _sysconfigdata is generated at build time, see the sysconfig module
54 + from _sysconfigdata import build_time_vars
55 global _config_vars
56 - _config_vars = g
58 + _config_vars = {}
59 + _config_vars.update(build_time_vars)
61 def _init_nt():
62 """Initialize the module as appropriate for NT"""
63 --
64 2.7.4