[Pythonmac-SIG] Python Universal packages- how can I help
Bob Ippolito
bob at redivi.com
Sat Apr 8 03:12:26 CEST 2006
On Apr 7, 2006, at 5:25 PM, Jordan Mantha wrote:
> Ok, so I recently got my first mac, an Intel iMac (17") for work.
> So far I have been totally impressed. I really enjoy OSX and starting
> to get into Python more. However, I'm starting to feel bad that I
> have this thing and I'm not helping with testing/building Universal
> packages for other people to enjoy. I'm particularly interested in
> scientific python packages (scipy and friends, matplotlib, pyx, etc.)
> and wxpython. Is there a general place to find tutorials or something
> on creating Universal python packages? I'd like to help fill in
> http://pythonmac.org/wiki/UniversalPackages if I can. How would I go
> about doing that?
The packages on that list are "unfriendly" in that they will not
trivially compile universally. Getting those packages up to
universal snuff is probably best left for the people who are already
familiar with the peculiarities of those packages and the nuances of
OS X porting and universal binaries. Most other packages should
compile trivially out of the box.
However, if you have a LOT of free time on your hands and you're
interested in the ugly details you'll want to read up on:
1. the lipo command
2. the -arch and -isysroot flags to cc
2. the -syslibroot and -arch flags to ld.
The universal build ships with a Makefile that tells distutils what
to do, but anything with external dependencies will need those
dependencies compiled by hand with custom environment variables to
produce a universal static or dynamic library out of them. Sometimes
it's trivial, other times not (especially if it does something stupid
like endian or CPU detection at ./configure time) and you may have to
compile PPC then i386 and lipo the result together (which may require
a separate machine for each architecture).
-bob
More information about the Pythonmac-SIG
mailing list