Thanks for posting that Ariel (and thanks to everyone else who pitched in).
I was finally able to install the svn trunk successfully.  I will say that I
still had a build problem which was probably due to my libpng version.  To
solve it, I rebuilt libpng in /usr/local/ and explicitly pointed the build
to it by modifying Ariels directions:

CFLAGS=-Os -arch i386 -I/usr/local/include/libpng12
LDFLAGS=-Os -arch i386 -L/usr/local/lib

and I set the 'darwin' key in setupext.py to '/usr/local'

I also manually deleted the python egg I had leftover from the EPD
installation.

I am not sure which of these things actually fixed the problem, but I can
finally successfully plot.

Uri

---------- Forwarded message ----------
From: Ariel Rokem <aro...@berkeley.edu>
To: John Hunter <jdh2...@gmail.com>
Date: Sat, 22 Aug 2009 12:48:41 -0700
Subject: Re: [matplotlib-devel] building from SVN on Mac OS X 10.5
Hi folks -

just to add to the noise. Here is what eventually worked for me (with
OS 10.5.8 and EPD 4.3), with help from Mike McKerns:

0. I removed the ~/.matplotlib folder ("rm -rf ~/.matplotlib").

1. I edited
/Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/config/Makefile,
removing all occurrences of "-arch ppc" (3 occurrences), changing the
line "MACOSX_DEPLOYMENT_TARGET=10.3" to
"MACOSX_DEPLOYMENT_TARGET=10.5" and changing the occurrences of
"MacOSX10.54u.sdk" into "MacOSX10.5.sdk" (3 occurrences). Here is the
full diff:

60c60
< BASECFLAGS=   -arch i386 -isysroot MacOSX10.5.sdk -fno-strict-aliasing
-Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic
---
> BASECFLAGS=   -arch ppc -arch i386 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -Wno-long-double
-no-cpp-precomp -mno-fused-madd -fno-common -dynamic
66c66
< LDFLAGS=      -arch i386 -isysroot MacOSX10.5.sdk -g -L/usr/local/lib
-L/Library/Frameworks/Python.framework/Versions/4.3.0/lib
---
> LDFLAGS=      -arch i386 -arch ppc -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -g -L/usr/local/lib
-L/Library/Frameworks/Python.framework/Versions/4.3.0/lib
115c115
< UNIVERSALSDK=MacOSX10.5.sdk
---
> UNIVERSALSDK=/Developer/SDKs/MacOSX10.4u.sdk
123c123
< MACOSX_DEPLOYMENT_TARGET=10.5
---
> MACOSX_DEPLOYMENT_TARGET=10.3
405c405
<               $(CC) -o $(LDLIBRARY) -arch i386 -dynamiclib \
---
>               $(CC) -o $(LDLIBRARY) -arch i386 -arch ppc -dynamiclib \

2.  In
/Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/site-packages/easy-install.pth,
I commented out the line containing the directory in which the
previous version of MPL was installed
("./matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg", in my case). If
I don't do this, when I import matplotlib, it imports the previous
version I had of MPL and just ignores the new installation. This is a
setuptools problem, so if you didn't have setuptools, good for you and
ignore this.

3. I ran the attached shell-script ("sh ./install-matplotlib.sh"),
based on a script by Mike McKerns, in the directory in which I wanted
my source to be. This script sets some local variable (CFLAGS,
LDFLAGS, PKG_CONFIG_PATH, ARCHFLAGS), removes previous installations,
downloads the source, builds and installs it. The backend seems to be
set to MacOSX.

I would be happy if someone who's had similar problems to the ones I
have had could test this procedure and see if it works for them as
well.

Cheers,

Ariel





-- 
Uri Laserson
PhD Candidate, Biomedical Engineering
Harvard Medical School (Genetics)
Massachusetts Institute of Technology (Mathematics)
phone +1 917 742 8019
laser...@mit.edu
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to