[3.9] bpo-41116: Fix setup.py test for macOS Tcl/Tk frameworks (GH-23649) (GH-23650)

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 29afab6c5f)

Co-authored-by: Ned Deily <nad@python.org>
This commit is contained in:
Miss Islington (bot) 2020-12-04 20:26:59 -08:00 committed by GitHub
parent d1f07419c7
commit 06002b3f0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -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.

View File

@ -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