mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-41116: Ensure system supplied libraries are found on macOS 11 (GH-23301)
On macOS system provided libraries are in a shared library cache and not at their usual location. This PR teaches distutils to search in the SDK, even if there was no "-sysroot" argument in the compiler flags.
This commit is contained in:
parent
453bc1da20
commit
404a719b51
4 changed files with 38 additions and 30 deletions
|
|
@ -290,7 +290,7 @@ class UnixCCompiler(CCompiler):
|
|||
cflags = sysconfig.get_config_var('CFLAGS')
|
||||
m = re.search(r'-isysroot\s*(\S+)', cflags)
|
||||
if m is None:
|
||||
sysroot = '/'
|
||||
sysroot = _osx_support._default_sysroot(sysconfig.get_config_var('CC'))
|
||||
else:
|
||||
sysroot = m.group(1)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue