mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
MacOSX: The universal build requires that users have the MacOSX10.4u SDK
installed to build extensions. This patch makes distutils emit a warning when the compiler should use an SDK but that SDK is not installed, hopefully reducing some confusion.
This commit is contained in:
parent
d610369e8b
commit
d6272a3cf6
1 changed files with 16 additions and 0 deletions
|
|
@ -82,6 +82,22 @@ def _darwin_compiler_fixup(compiler_so, cc_args):
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# Check if the SDK that is used during compilation actually exists,
|
||||||
|
# the universal build requires the usage of a universal SDK and not all
|
||||||
|
# users have that installed by default.
|
||||||
|
sysroot = None
|
||||||
|
if '-isysroot' in cc_args:
|
||||||
|
idx = cc_args.index('-isysroot')
|
||||||
|
sysroot = cc_args[idx+1]
|
||||||
|
elif '-isysroot' in compiler_so:
|
||||||
|
idx = compiler_so.index('-isysroot')
|
||||||
|
sysroot = compiler_so[idx+1]
|
||||||
|
|
||||||
|
if sysroot and not os.path.isdir(sysroot):
|
||||||
|
log.warn("Compiling with an SDK that doesn't seem to exist: %s",
|
||||||
|
sysroot)
|
||||||
|
log.warn("Please check your Xcode installation")
|
||||||
|
|
||||||
return compiler_so
|
return compiler_so
|
||||||
|
|
||||||
class UnixCCompiler(CCompiler):
|
class UnixCCompiler(CCompiler):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue