[Pythonmac-SIG] Building extensions on 10.4 that can be used on 10.3?

Christopher Barker Chris.Barker at noaa.gov
Tue Jan 17 23:17:39 CET 2006


Russell E. Owen wrote:
> Are there any tips or tricks to building 3rd party python extensions on 
> MacOS X 10.4 in such a way that 10.3 users can use them?

It can be done, but I think it's PITA

> <http://pythonmac.org/packages/> has most or all the extensions I need, 
> but some of the ones I use are fairly outdated (especially numarray). So 
> another option is to contribute modern versions built on 10.3 before I 
> upgrade. But I'm not sure how practical that is; I only have 10.3/Python 
> 2.3

Installing 2.4.1 from undefined.org/python is pretty trivial.

In fact, using the 2.4.1 Framework build for OS-X 10.3, and installing 
it on both 10.3 and 10.4 might well do what you want. I know the 10.3 
stuff will all run on 10.4, it's just a question of what C libs get 
linked if you build on 10.4, using the 10.3 Python. I suspect that if 
you use distutils, it might all work, but if you build everything on 
10.3, you're all set.

> with instructions on how to create 
> the package.

This is very easy for anything that builds with distutils. Py2App comes 
with bdist_mpkg, which will build a *.mpkg from setup.py. The only 
tricky part is external libs. For instance, for matplotlib, I need to 
make sure it statically linked libpng and libfreetype, so that the 
package would run on a stock OS-X.

It would be great if you contributed some upgraded packages to pythonmac.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer
                                     		
NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Pythonmac-SIG mailing list