[Pythonmac-SIG] help build unix python on Mac
Russell E Owen
owen@astro.washington.edu
Mon, 21 Apr 2003 12:10:51 -0700
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).
The problem I have is I keep getting a python that uses the Aqua
(framework) Tk instead of the unix X Tk that I also have installed.
Any hints on how to do this? Details on what I tried are appended.
I suppose I can just use fink, but was hoping to just do everything
from source.
-- Russell
Details:
- I first installed the framework stuff from source (tcl 8.4.1, tk
8.4.1 and Python 2.2.2). I did this many months ago and have been
happily using it ever since.
So...the next step was to get the non-framework unix X stuff installed:
- installed Apple's X11 application and X11 SDK using Apple's two
package installers
- tried to clear out as much of the old stuff as possible, having
first plowed ahead w/out and run into the problem of Python seeing
only the framework Tk:
- went into /usr/local
- deleted all tcl and Tk and python stuff (except pythonw) in ./bin,
./includes and ./lib.
I then built tcl and Tk from their unix directories. This worked with
a few warnings. One oddity: there was a /usr/local/bin/wish8.4 but no
/usr/local/bin/wish. If I typed "wish" at the terminal I got the Aqua
(framework) wish. So I I made /usr/local/wish a symbolic link, closed
the terminal window and opened a new one (as one seems to have to do
after messing with /usr/local/bin).
unix X11-baseed Tk seems to work. Typing % wish at a Terminal brings
up the X11 wish. I can add widgets and use them. That's all the
testing I've done.
I then rebuilt python using:
% make clean
% ./configure
% make
Unfortunately, it is linking against the framework build of Tcl/Tk. I
get warnings like:
/Library/Frameworks/Tk.framework/Headers/X11/Xlib.h:140: warning:
function declaration isn't a prototype
and if I finish with sudo make install I get the usual framework Tk stuff.
I've tried about 4 variations on of this sequence with no luck. I
really don't want to have to clear *everything* (including the
framework stuff) out and risk breaking a working framework build. Any
suggestions?