[issue39162] setup.py not picking up tkinter headers from non-system macOS Tcl and Tk frameworks

2020-05-18 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the report and the PR. Yes, detect_tkinter_darwin() had a number of 
problems due mainly to how Apple has first deprecated and more recently removed 
the option to have header files installed in the running system. Plus some 
nasty quirks of how the Tcl and Tk frameworks are built make it difficult to 
use them without hacks for embedding while supporting Python build options.  
Your analysis was helpful. In the end, I tried to fix this and some more 
general problems in detect_tkinter_darwin() with PR 20171 for Issue34956 which 
will be available in 3.9.0b1.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> _tkinter built on macOS 10.14 does not link to Tcl and Tk in 
/Library/Frameworks
title: setup.py not picking up tkinter headers -> setup.py not picking up 
tkinter headers from non-system macOS Tcl and Tk frameworks
versions: +Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread Ned Deily


Change by Ned Deily :


--
assignee:  -> ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw


anthony shaw  added the comment:

This comes down to a logic bug in detect_tkinter_darwin(), shown in 
https://github.com/python/cpython/pull/17753/files#r361956102

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw


Change by anthony shaw :


--
keywords: +patch
pull_requests: +17189
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17753

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw


anthony shaw  added the comment:

I also can't see how this condition would ever match, since macosx_sdk_root() 
is not in the list being iterated upon,
https://github.com/python/cpython/blob/master/setup.py#L1774

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw


Change by anthony shaw :


--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw


New submission from anthony shaw :

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

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com