summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/sysconfig.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 7b78440..c2f28f5 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -341,6 +341,15 @@ def get_makefile_filename():
config_dir_name += '-%s' % sys.implementation._multiarch
return os.path.join(get_path('stdlib'), config_dir_name, 'Makefile')
+
+def _get_sysconfigdata_name():
+ return '_sysconfigdata_{abi}_{platform}_{multiarch}'.format(
+ abi=sys.abiflags,
+ platform=sys.platform,
+ multiarch=getattr(sys.implementation, '_multiarch', ''),
+ )
+
+
def _generate_posix_vars():
"""Generate the Python module containing build-time variables."""
import pprint
@@ -381,7 +390,7 @@ def _generate_posix_vars():
# _sysconfigdata module manually and populate it with the build vars.
# This is more than sufficient for ensuring the subsequent call to
# get_platform() succeeds.
- name = '_sysconfigdata_' + sys.abiflags
+ name = _get_sysconfigdata_name()
if 'darwin' in sys.platform:
import types
module = types.ModuleType(name)
@@ -407,7 +416,7 @@ def _generate_posix_vars():
def _init_posix(vars):
"""Initialize the module as appropriate for POSIX systems."""
# _sysconfigdata is generated at build time, see _generate_posix_vars()
- name = '_sysconfigdata_' + sys.abiflags
+ name = _get_sysconfigdata_name()
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
build_time_vars = _temp.build_time_vars
vars.update(build_time_vars)