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.21 by davidlt, Sat Feb 4 08:23:21 2012 UTC vs.
Revision 1.25 by eulisse, Wed Jul 4 15:27:25 2012 UTC

# Line 1 | Line 1
1   ### RPM external py2-matplotlib 1.0.1
2   ## INITENV +PATH PYTHONPATH %i/$PYTHON_LIB_SITE_PACKAGES
3   Source: http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-%{realversion}/matplotlib-%{realversion}.tar.gz
4 + Requires: py2-pytz py2-numpy py2-python-dateutil zlib libpng freetype
5  
5 Requires: py2-numpy
6 Requires: zlib
7 Requires: libpng
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
17 > gtkagg = False
18 > tkagg = False
19 > wxagg = False
20 > macosx = False
21   EOF
22  
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 < # Pick up the system compiler also when building with gcc 4.6.1 on mac.
29 < case %cmsos in
20 <  osx*_*_gcc421) ;;
21 <  osx*)
22 <    export PATH=/Developer/usr/bin:$PATH
23 <    export CC='/Developer/usr/bin/llvm-gcc-4.2'
24 <    export CXX='/Developer/usr/bin/llvm-g++-4.2'
25 <  ;;
26 < esac
28 > export MPLCONFIGDIR=$PWD/no-pkg-config
29 > PATH=$PWD/no-pkg-config:$PATH \
30   python setup.py build
31  
32   %install
33   python -c 'import numpy'
34 + PATH=$PWD/no-pkg-config:$PATH \
35 + # Notice that the install procedure will try to write in $HOME/.matplotlib by
36 + # default!!! This should work around the problem and have it write config
37 + # in a scratch area.
38 + export MPLCONFIGDIR=$PWD/no-pkg-config
39 +
40   python setup.py install --prefix=%i
41   find %i -name '*.egg-info' -exec rm {} \;
42  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines