ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/py2-matplotlib.spec
(Generate patch)

Comparing COMP/CMSDIST/py2-matplotlib.spec (file contents):
Revision 1.22 by lat, Mon Mar 12 09:49:54 2012 UTC vs.
Revision 1.24 by eulisse, Tue Jul 3 15:13:58 2012 UTC

# Line 5 | Line 5 | Requires: py2-pytz py2-numpy py2-python-
5  
6   %prep
7   %setup -n matplotlib-%{realversion}
8 + perl -p -i -e '/^import sys/ && print "for v in basedir.values(): v[:] = []\n"' setupext.py
9  
10   cat >> setup.cfg <<- EOF
11   [build_ext]
12 < include_dirs = $LIBPNG_ROOT/include:$ZLIB_ROOT/include:/usr/X11R6/include:/usr/X11R6/include/freetype2
13 < library_dirs = $LIBPNG_ROOT/lib:$ZLIB_ROOT/lib:/usr/X11/lib
12 > include_dirs = $FREETYPE_ROOT/include/freetype2:$FREETYPE_ROOT/include:$LIBPNG_ROOT/include:$ZLIB_ROOT/include:/usr/X11R6/include:/usr/X11R6/include/freetype2
13 > library_dirs = $FREETYPE_ROOT/lib:$LIBPNG_ROOT/lib:$ZLIB_ROOT/lib:/usr/X11/lib
14  
15   [gui_support]
16   gtk = False
# Line 19 | Line 20 | wxagg = False
20   macosx = False
21   EOF
22  
23 < rm -f freetype2
24 < ln -s $FREETYPE_ROOT/include freetype2
23 > mkdir no-pkg-config
24 > (echo '#!/bin/sh'; echo 'exit 1') > no-pkg-config/pkg-config
25 > chmod +x no-pkg-config/pkg-config
26  
27   %build
28 + PATH=$PWD/no-pkg-config:$PATH \
29   python setup.py build
30  
31   %install
32   python -c 'import numpy'
33 + PATH=$PWD/no-pkg-config:$PATH \
34 + # Notice that the install procedure will try to write in $HOME/.matplotlib by
35 + # default!!! This should work around the problem and have it write config
36 + # in a scratch area.
37 + export MPLCONFIGDIR=$PWD/no-pkg-config
38 +
39   python setup.py install --prefix=%i
40   find %i -name '*.egg-info' -exec rm {} \;
41  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines