[Pythonmac-SIG] Building Python with X11 Tkinter
ronaldoussoren at mac.com
Mon Dec 10 07:56:14 CET 2007
On 8 Dec, 2007, at 1:40, C. E. Ball wrote:
> On OS X, I'd like to be able to build my own copy of Python that uses
> my own copy of Tkinter (built for X11). I've seen several posts to
> this list where people mention building python this way (e.g.  and
>  below), but I'm pretty unfamiliar with the concepts, so I wonder
> if someone could give me some more help, or point me to a place where
> there are some instructions?
I don't know of any instructions for that, but it should be
straightforward to build such a beast.
There is one tricky bit though: Python's build process "knows" that
Tcl/Tk on OSX is a framework and won't even look for a unixy library
location. That's easy to work around though: edit setup.py and look
for the definition of detect_tkinter. At the start of that method it
checks if the platform is 'darwin' and does something osx-specific
when it is. Just disable that test to get the standard unix behaviour.
That is, replace " if (platform == 'darwin' and" by " if
0 and (platform == 'darwin' and".
BTW. Could you please file a bug report for this at bugs.python.org?
It would be fairly easy to add an argument to python's configure
script that does this automaticly. I don't have time to work on that
right now and a bugreport would help us to remember that adding such
an argument would be useful to people.
More information about the Pythonmac-SIG