summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorXavier de Gaye <xdegaye@users.sourceforge.net>2016-09-11 20:22:24 (GMT)
committerXavier de Gaye <xdegaye@users.sourceforge.net>2016-09-11 20:22:24 (GMT)
commit92dec548ff1494b86f08bd3753ca91a9330b4ea9 (patch)
treef45ab78e107ff109cc7e7c2e45b966a684500ede /Lib/distutils
parentef71d2054835029fe54d577c154c43d2a5856d2f (diff)
downloadcpython-92dec548ff1494b86f08bd3753ca91a9330b4ea9.zip
cpython-92dec548ff1494b86f08bd3753ca91a9330b4ea9.tar.gz
cpython-92dec548ff1494b86f08bd3753ca91a9330b4ea9.tar.bz2
Issue #28046: get_sysconfigdata_name() uses the _PYTHON_SYSCONFIGDATA_NAME
environment variable that is defined when cross-compiling.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/sysconfig.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 229626e..8bf1a70 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -418,11 +418,12 @@ _config_vars = None
def _init_posix():
"""Initialize the module as appropriate for POSIX systems."""
# _sysconfigdata is generated at build time, see the sysconfig module
- name = '_sysconfigdata_{abi}_{platform}_{multiarch}'.format(
+ name = os.environ.get('_PYTHON_SYSCONFIGDATA_NAME',
+ '_sysconfigdata_{abi}_{platform}_{multiarch}'.format(
abi=sys.abiflags,
platform=sys.platform,
multiarch=getattr(sys.implementation, '_multiarch', ''),
- )
+ ))
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
build_time_vars = _temp.build_time_vars
global _config_vars