[Pythonmac-SIG] matplotlib on Tiger---and Panther, with Py2.3 and Py2.4...

Chris Barker Chris.Barker at noaa.gov
Wed Jun 8 20:47:45 CEST 2005



John Hunter wrote:
> If either of you have a diff against setup*.py that will make mpl src
> builds on these systems work better, I'll fold them into the main
> line.

I had intended to do this, but before I do, I think theres a need for a 
little discussion.

Charles and I have taken two different approaches to dealing with the 
dependencies not included in stock OS-X:

libpng
libfreetype

(as noted by Charles, libfreetype does seem to exist, in some form with 
Apple's X11 implementation, but neither of us could get it to work)

The way I handled these libs was to build them as static libs, install 
them inside the matplotlib build tree, then alter the setup.py so that 
it would use the statically linked versions. This resulted in a simple 
stand-alone binary, that is easy to install. However, you do need to put 
those static libs in the right place before you can build, so I wasn't 
sure we'd want to hard-code that into the stock setup.py. You do need to 
resolve the dependencies in some way in any case, so maybe it's not a 
bad idea.

My understanding is that Charles took an alternative approach: providing 
libpng and libfreetype as OS-X Frameworks, and building matplotlib 
against those. This is really the way it "should" be done on OS-X. 
However, it seems a little harder to set up to me (unless the libs in 
question work with  a --framework flag to make. I spend a lot more time 
on Linux, so all this is a bit of a mystery to me.) It also strikes me 
as a little harder to make a package out of, as you've got multiple 
things to install and bdist_mpkg won't just do it for you.

What are other's thoughts about the best way to do this? It would be 
nice to have a standard approach built into the matplotlib setup.py.

-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