Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

GH-127429: fix sysconfig data generation on cross-builds #127430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Dec 2, 2024
Prev Previous commit
Fix get_config_var('abiflags') in cross-builds
Signed-off-by: Filipe Laíns <lains@riseup.net>
  • Loading branch information
FFY00 committed Dec 1, 2024
commit 0184295f4a6bd7f22bc52b0ec21b27d8a3661855
12 changes: 7 additions & 5 deletions 12 Lib/sysconfig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,11 @@ def _init_config_vars():
base_prefix = _BASE_PREFIX
base_exec_prefix = _BASE_EXEC_PREFIX

try:
abiflags = sys.abiflags
except AttributeError:
abiflags = ''

if os.name == 'posix':
_init_posix(_CONFIG_VARS)
# If we are cross-compiling, load the prefixes from the Makefile instead.
Expand All @@ -486,6 +491,7 @@ def _init_config_vars():
exec_prefix = _CONFIG_VARS['exec_prefix']
base_prefix = _CONFIG_VARS['prefix']
base_exec_prefix = _CONFIG_VARS['exec_prefix']
abiflags = _CONFIG_VARS['ABIFLAGS']

# Normalized versions of prefix and exec_prefix are handy to have;
# in fact, these are the standard versions used most places in the
Expand All @@ -503,11 +509,7 @@ def _init_config_vars():
_CONFIG_VARS['platlibdir'] = sys.platlibdir
_CONFIG_VARS['implementation'] = _get_implementation()
_CONFIG_VARS['implementation_lower'] = _get_implementation().lower()
try:
_CONFIG_VARS['abiflags'] = sys.abiflags
except AttributeError:
# sys.abiflags may not be defined on all platforms.
_CONFIG_VARS['abiflags'] = ''
_CONFIG_VARS['abiflags'] = abiflags
try:
_CONFIG_VARS['py_version_nodot_plat'] = sys.winver.replace('.', '')
except AttributeError:
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.