[New-bugs-announce] [issue39162] setup.py not picking up tkinter headers
anthony shaw
report at bugs.python.org
Mon Dec 30 03:35:06 EST 2019
New submission from anthony shaw <anthonyshaw at apache.org>:
./configure && make -j4 is returning:
Failed to build these modules:
_tkinter
I'm running macOS 10.15.2, with the SDK installed using `xcode-select --install` (no funny business)
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/
xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
If I debug setup.py, I can see it's eagerly returning the wrong path (/System)
On a REPL, if I do:
>>> import setup
>>> setup.macosx_sdk_root()
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
So the path is correct, but I can see in setup.py that detect_tkinter_darwin() will break inside the loop if /System/Library/Frameworks/Tk.framework/Versions/Current exists (which it does), but it doesn't contain the headers, it contains 3 directories:
Resources Tk _CodeSignature
I think detect_tkinter_darwin should be updated so that framework_dirs scans macosx_sdk_root first, but I don't know what other scenarios this might break.
I'd be happy to submit a patch for my scenario but it looks like this whole function needs tests so each platform change and scenario as they come up. There's loads of other issues on BPO related.
----------
components: Build
messages: 359026
nosy: anthonypjshaw
priority: normal
severity: normal
status: open
title: setup.py not picking up tkinter headers
type: compile error
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39162>
_______________________________________
More information about the New-bugs-announce
mailing list