Skip to content

Commit

Permalink
Merge pull request pypa/distutils#173 from rnhmjoj/main
Browse files Browse the repository at this point in the history
Fix, again, finding headers during cross compiling
  • Loading branch information
jaraco committed Aug 21, 2022
2 parents 610da0b + 5152a55 commit 22b9bcf
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions distutils/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,19 @@ def _get_python_inc_from_config(plat_specific, spec_prefix):
the host
platform Python installation, while the current Python
executable is from the build platform installation.
>>> monkeypatch = getfixture('monkeypatch')
>>> gpifc = _get_python_inc_from_config
>>> monkeypatch.setitem(gpifc.__globals__, 'get_config_var', str.lower)
>>> gpifc(False, '/usr/bin/')
>>> gpifc(False, '')
>>> gpifc(False, None)
'includepy'
>>> gpifc(True, None)
'confincludepy'
"""
if not spec_prefix:
return
return get_config_var('CONF' * plat_specific + 'INCLUDEPY')
if spec_prefix is None:
return get_config_var('CONF' * plat_specific + 'INCLUDEPY')


def _get_python_inc_posix_prefix(prefix):
Expand Down

0 comments on commit 22b9bcf

Please sign in to comment.