Summary: | dev-lang/python-2.7.1: USE=tk tries linking to X11 even when dev-lang/tk was built USE=aqua | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Charles Davis <cdavis5x> |
Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
Status: | VERIFIED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | OS X | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Build log for dev-lang/python-2.7.1-r00.1 |
Description
Charles Davis
2010-12-21 21:02:59 UTC
Created attachment 257708 [details]
Build log for dev-lang/python-2.7.1-r00.1
I think I've figured out the problem. In Python's setup.py, there are two methods for detecting how to build the _tkinter module. The 'regular' method gets called on every other platform. Then there's the special Darwin method. It checks to see if there are Tcl and Tk frameworks to be found. Since there aren't, because Gentoo's Tcl and Tk are installed as plain ol' dylibs even on Mac OS, that check fails. So Python falls into the 'regular' method--which, unfortunately, assumes 'Unix' == 'X11'. The question is now, what's the proper fix? In the long term, this needs to be fixed upstream (i.e. detect_tkinter_darwin() should detect Aqua-built dylibs as well as frameworks), but I'm looking for a short-term fix so I can get 2.7 built here. python's setup.py shouldn't do anything special for OSX on Prefix. I'll try to patch it out. I added a patch to python-2.7.1-r00.1 not to blindly link against X11 when using tkinter. Thanks for the research! Thanks! |