diff --git a/Modules/Setup b/Modules/Setup index 11ddd0c7b2..9b8b5158c4 100644 --- a/Modules/Setup +++ b/Modules/Setup @@ -168,7 +168,7 @@ _symtable symtablemodule.c #array arraymodule.c # array objects #cmath cmathmodule.c _math.c # -lm # complex math library functions -#math mathmodule.c _math.c # -lm # math library functions, e.g. sin() +math mathmodule.c _math.c # -lm # math library functions, e.g. sin() #_contextvars _contextvarsmodule.c # Context Variables #_struct _struct.c # binary structure packing/unpacking #_weakref _weakref.c # basic weak reference support @@ -192,7 +192,7 @@ _symtable symtablemodule.c #fcntl fcntlmodule.c # fcntl(2) and ioctl(2) #spwd spwdmodule.c # spwd(3) #grp grpmodule.c # grp(3) -#select selectmodule.c # select(2); not on ancient System V +select selectmodule.c # select(2); not on ancient System V # Memory-mapped files (also works on Win32). #mmap mmapmodule.c @@ -223,7 +223,7 @@ _symtable symtablemodule.c #termios termios.c # Steen Lumholt's termios module #resource resource.c # Jeremy Hylton's rlimit interface -#_posixsubprocess _posixsubprocess.c # POSIX subprocess module helper +_posixsubprocess _posixsubprocess.c # POSIX subprocess module helper # Multimedia modules -- off by default. # These don't work for 64-bit platforms!!! @@ -239,18 +239,18 @@ _symtable symtablemodule.c # The _md5 module implements the RSA Data Security, Inc. MD5 # Message-Digest Algorithm, described in RFC 1321. -#_md5 md5module.c +_md5 md5module.c # The _sha module implements the SHA checksum algorithms. # (NIST's Secure Hash Algorithms.) -#_sha1 sha1module.c -#_sha256 sha256module.c -#_sha512 sha512module.c -#_sha3 _sha3/sha3module.c +_sha1 sha1module.c +_sha256 sha256module.c +_sha512 sha512module.c +_sha3 _sha3/sha3module.c # _blake module -#_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c +_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c # The _tkinter module. # diff --git a/setup.py b/setup.py index b96961073b..e1dbd71bb4 100644 --- a/setup.py +++ b/setup.py @@ -134,7 +134,8 @@ def macosx_sdk_root(): cflags = sysconfig.get_config_var('CFLAGS') m = re.search(r'-isysroot\s+(\S+)', cflags) if m is None: - sysroot = '/' + import subprocess + sysroot = subprocess.check_output(["xcrun", "--show-sdk-path"]).decode("utf-8").strip('\n') else: sysroot = m.group(1) return sysroot @@ -146,6 +147,7 @@ def is_macosx_sdk_path(path): """ return ( (path.startswith('/usr/') and not path.startswith('/usr/local')) or path.startswith('/System/') + or path.startswith('/Applications/') or path.startswith('/Library/') )