]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.9] bpo-41116: Fix setup.py test for macOS Tcl/Tk frameworks (GH-23649) (GH-23650)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 5 Dec 2020 04:26:59 +0000 (20:26 -0800)
committerGitHub <noreply@github.com>
Sat, 5 Dec 2020 04:26:59 +0000 (23:26 -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.
(cherry picked from commit 29afab6c5f656f07ac85c9b2cf089631b2557a11)

Co-authored-by: Ned Deily <nad@python.org>
Misc/NEWS.d/next/macOS/2020-12-04-23-09-11.bpo-41116.mSbXyV.rst [new file with mode: 0644]
setup.py

diff --git a/Misc/NEWS.d/next/macOS/2020-12-04-23-09-11.bpo-41116.mSbXyV.rst b/Misc/NEWS.d/next/macOS/2020-12-04-23-09-11.bpo-41116.mSbXyV.rst
new file mode 100644 (file)
index 0000000..2c8e5ea
--- /dev/null
@@ -0,0 +1,3 @@
+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.
index bfe621d0b50da1c140333e8eb27554b20e6e0e39..bd5f73692441cb0d12b843a91afc9918e1d5b08e 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