[Pythonmac-SIG] help build unix python on Mac

Russell E Owen owen@astro.washington.edu
Tue, 22 Apr 2003 09:36:16 -0700


At 10:47 PM +0200 4/21/03, Jack Jansen wrote:
>On maandag, apr 21, 2003, at 21:10 Europe/Amsterdam, Russell E Owen wrote:
>
>>I've already installed a framework build of Python 2.2.2 (with Aqua 
>>Tk 8.4.1) from source. I would also like a non-framework build that 
>>uses unix X style Tk windows (so I can see how my application will 
>>look to unix users)....<help it doesn't work>...
>
>Look in setup.py in the toplevel Python source directory. It had a 
>large amount of code that specifically tries to locate your Tcl and 
>Tk. There's a special section that is executed first that looks for 
>AquaTk. If you disable that (*and* if you have installed X11 and a 
>normal X11 Tcl/Tk too, in the usual place) the normal unix code 
>should kick in and you should get an _tkinter that uses that.
>
>I haven't tried this, though, so please let us know whether it works:-)

It worked! It was easy to find the subroutine and easy to tell that 
it returned 0 if it could not find Aqua Tk. So I just made it return 
0 right away, redid the build from scratch and got a working X-based 
Python/Tkinter.

Of course the framework and unix-X Pythons do *not* share add-on 
packages. Fortunately I only use a few. Also fortunately Python 
cleverly installs packages in the version of python you use to run 
setup.py; otherwise it would be a nightmare trying to maintain 
multiple versions of Python on a computer.

Thank you very much!

-- Russell