◐ Shell
clean mode source ↗

bpo-39162 fix a logic bug in the Tcl/Tk include scanner for macOS in setup.py by tonybaloney · Pull Request #17753 · python/cpython

…ested for existence, it's then later added to the include

tonybaloney


for fw in 'Tcl', 'Tk':
if is_macosx_sdk_path(F):
if not exists(join(sysroot, F[1:], fw + '.framework')):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, this condition would match, because in macOS 10.15 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework exists, however, F is not the path that it's checking, so it adds /System/Library/Frameworks/Tk.framework to the list of include_dirs

@tonybaloney

Wow, this function hasn't been touched in a really long time. requesting reviews from @ned-deily and @brettcannon

@ned-deily

Thanks again for the PR. After much consideration, I tried to address the problems noted here as well as some other problems in #20171 for bpo-34956.