]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41116: Fix setup.py test for macOS Tcl/Tk frameworks (GH-23649)
authorNed Deily <nad@python.org>
Sat, 5 Dec 2020 04:02:09 +0000 (23:02 -0500)
committerGitHub <noreply@github.com>
Sat, 5 Dec 2020 04:02:09 +0000 (23:02 -0500)
If no explicit macOS SDK was specified, setup.py should check for
Tcl and TK frameworks in /Library/Frameworks; the previous commit
inadvertently broke that test.

setup.py

index 0c9a42501686926eb7b8a186c89d8619a41827e9..90588e8b1d1fca183c96ab9b0b0a83cd3c221046 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -177,10 +177,11 @@ def macosx_sdk_root():
     m = re.search(r'-isysroot\s*(\S+)', cflags)
     if m is not None:
         MACOS_SDK_ROOT = m.group(1)
+        MACOS_SDK_SPECIFIED = MACOS_SDK_ROOT != '/'
     else:
         MACOS_SDK_ROOT = _osx_support._default_sysroot(
             sysconfig.get_config_var('CC'))
-    MACOS_SDK_SPECIFIED = MACOS_SDK_ROOT != '/'
+        MACOS_SDK_SPECIFIED = False
 
     return MACOS_SDK_ROOT