Building Python 2.2.2 with Aqua TCL/TK on OS X

Weston Cann google at utahvalleymusic.com
Tue Dec 17 16:13:24 EST 2002


I am building (as the title suggests, or trying to anyway) Python
2.2.2 with Aqua TCL/TK and tkinter on Mac OS X (10.1.5)... I think
I've got the Dec 2001 Dev Tools (gcc-932.1/2.95.2). Here's what I've
done so far:

(1) Grabbed the vanilla Python 2.2.2 tarball
(2) Following the instructions found at
http://tony.lownds.com/macosx/tkinter.html, I grabbed
MacOSXTk8.4a4-2.tar.gz, and untarred it... looks like it dropped some
stuff into /Library/Frameworks.
(3) Addded the stuff to Modules/Setup.local that Tony recommended:

*shared*
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
        -I/Library/Frameworks/Tcl.framework/Headers/ \
        -I/Library/Frameworks/Tcl.framework/Versions/Current/PrivateHeaders/
\
        -I/Library/Frameworks/Tk.framework/Headers/ \
        -I/Library/Frameworks/Tk.framework/Versions/Current/PrivateHeaders/
\
        -I/usr/X11R6/include/ \
        -framework Tcl -framework Tk

(4) Started the configure/make dance, which stopped when it complained
I was missing some X11 Libraries. At this point, I sort of
hesitated... I really don't want to install X11 on my machine... it's
tight on disk space, and X and I have some bad karma to work out
anyway.
(5) Went looking for (and found) Tcl/Tk Aqua... grabbed
TclTkAqua-8.4.1 from SourceForge. I clicked on the install package and
it looks like it overwrote the previously installed frameworks (?)
(6) Again, I started make. There were lots of warnings, none of which
I had any idea of how seriously to take...
(7) Did make test... it passed all but one test (socket), and it said
there were three unexpected tests Darwin...
(8) sudo make frameworkinstall
(9) sudo make install

Now, the results. First of all, the python interpreter doesn't seem to
be installed in a place I'd expect it... no /usr/local/bin or /usr/bin
(/usr/local does exist on my machine). It did get buit... I found
python.exe in the root of the Python2.2.2 directory. It runs. Even
better, when I type the "Our first tkinter program" (example 2-1) fom
Frederick Lundh's "An Introduction to tkinter" into the interpreter,
it works... Yet Another Hello World has been executed.

So why am I posting? Well...  I just have the uneasy feeling that
comes from not really knowing what I'm doing, and the fact that the
interpreter didn't appear where I expected it to compounded that. I'd
like to just move it over to /usr/local/bin ... can I do that? Are
there other library files I need to move? Or did they all go in
/Library/Frameworks? What about that "        -I/usr/X11R6/include/ \"
line in Modles/Setup.local... is it doing anything useful for me? Do I
need to worry that it failed the socket test? Now that I've done the
compile, since disk space is tight, can I safely remove all the
sources?? Did I do anything that wasn't necessary? Do I sound insecure
enough?



More information about the Python-list mailing list