[Pythonmac-SIG] Trouble installing Tkinter with 2.3.5/10.2

Kevin Walzer kw at codebykevin.com
Wed May 21 19:42:44 CEST 2008


Anthony Kozar wrote:

> (1) Another reason that I am hesitant to roll my own Python is that I also
> sometimes build Csound packages for distribution, an open-source project
> with its own Python extensions.  We have enough trouble with providing
> binary distributions on OS X that match pre-compiled versions of Python.

I'm sympathetic to this, but that's why the option to build from source 
code exists--so you don't have to be tied to binary distributions. In 
this case, the platform you are supporting is considered by the 
community to be obsolete, and no effort is made to support it with 
current binary packages. Your only option, apparently, is to build from 
source.

Understand, also, that anything you build on 10.2 won't be a universal 
binary and won't run on Intel except under Rosetta emulation--i.e., much 
slower. And if it somehow conflicts with a native version (i.e. it's a 
PPC dylib and the Intel exe is trying to load it), it might crash.

> 
> (2) (From what I've read it looks like the latest versions of Python and
> Tcl/Tk can be compiled on 10.2 too -- makes me wonder why the packagers
> don't use the 10.2 SDK when compiling ...)

Most likely because 10.2 is PPC only, and the standard for binary 
distributions these days is universal binary (Intel + PPC). It's 
possible to compile stuff so it runs natively on 10.2 (PPC) and Intel 
(10.3 +), but it's very complicated--most likely you'd have to use two 
separate versions of gcc, and then glue things together with the lipo 
tool. That's too much hassle for most people. You'd also be completely 
on your own in terms of debugging.

The official Mac build of Python from Python.org supports (AFAIK) 10.3.9 
and onward, for both PPC and Intel machines. This is built in an 
efficient manner using Apple's API's, using the standard 
configure-make-make-install dance, with the appropriate flags 
(--enable-framework/--enable-universalsdk). Boom, you have a Python that 
supports three versions of the OS and two processor architectures. That 
covers, most likely, 95% of the potential use cases for Python.

Tcl/Tk can be built to support 10.2 with a universal binary structure, 
with "weak-linking," but I haven't tested this. When I build Tcl/Tk, I 
support 10.4 and up as a universal binary.

Any reason you have to support 10.2, apart from the fact that it's what 
your machine runs? The user base for 10.2 is negligible.

--Kevin

--

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com


More information about the Pythonmac-SIG mailing list