On Aug 23, 2013, at 8:14 AM, Matt Terry <matt.te...@gmail.com> wrote:

> I'm banging away at installing MPL on top of python.org's python.  I'm at the 
> libfreetype/freetype issue.  There seems to be three approaches to getting 
> MPL's dependencies.
> 
> 1) install libpng[1] and freetype[2] from source
> 2) install XQuartz[3] and twiddle /opt/X11, /usr/X11 (per Russell's 
> directions[4]) so MPL finds XQuartz's libpng/freetype
> 3) install XQuartz[3] and install pkg-config[5] so MPL can find the cleverly 
> installed libraries
> 4) create the MPL binary installer and use that
> 
> Option 1 seems simple-est, but installing freetype requires more than 
> ./configure && make && sudo make install.
> Option 2 worries me with the manual symlinking and such.  Who knows what 
> we'll clobber.
> Option 3: haven't fully explored.
> Option 4: This would require some input from whoever (Gohlke?, Owen?) makes 
> the binary installers.
> 
> [1] http://www.libpng.org/pub/png/libpng.html
> [2] http://www.freetype.org/index.html
> [3] http://xquartz.macosforge.org/landing/
> [4] http://www.astro.washington.edu/users/rowen/BuildingMatplotlibForMac.html
> [5] http://www.freedesktop.org/wiki/Software/pkg-config/

I'm a bit puzzled what you are trying to do. I've found that matplotlib "just 
builds" if I only want to use it on the Mac I'm building it on. Depending on 
what you've added to your Mac you may find you have to restrict the search dirs 
in setupext.py, but that's all I have ever had to do for years.

For me the problems arise when trying to build a binary installer that runs on 
multiple versions of MacOS.

The following comments all deal with that case (making a binary installer):

I would eliminate (2) as an option; I thought it would help but it doesn't 
(perhaps I need to update my matplotlib build instructions). The issue is that 
when I build a binary installer on 10.8, it cannot be used on 10.6 because it 
is looking for some libraries in /opt/X11 (which is where XQuartz is installed 
on 10.8) instead of /usr/X11 (which is where X11 is installed on 10.6). It's 
only an issue for binary installers; I haven't had any problem just building 
matplotlib for python.org python.

I have pretty much given up building binary installers on anything but the 
oldest version of MacOS X that they can be used on (or as close as I can get). 
I've just run into too many problems like this.

I like (1) for binary installers. It eliminates the need for a user to have 
installed X11 at all. The hassle is making sure matplotlib statically links 
these libraries. I've always done this by taking the crude approach of deleting 
the shared object libraries, leaving only the static libraries; it always 
worked in the past, but recently I ran into a problem where something I was 
building simply refused to use a static library (I don't remember the details).

Regarding option [4]. You can get a binary installer for matplotlib 1.3 from 
here:
<http://www.astro.washington.edu/users/rowen/python/>
but it may clobber your python-dateutil and pytz (especially likely if they 
were installed by the matplotlib 1.2.1 binary installer). That's the main 
reason it's not an official binary installer.

-- Russell

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to