mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #28046: get_sysconfigdata_name() uses the _PYTHON_SYSCONFIGDATA_NAME
environment variable that is defined when cross-compiling.
This commit is contained in:
parent
ef71d20548
commit
92dec548ff
4 changed files with 14 additions and 31 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue