1 |
< |
### RPM external py2-matplotlib 0.90.1 |
2 |
< |
## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages |
3 |
< |
%define downloadn matplotlib |
4 |
< |
Source: http://switch.dl.sourceforge.net/sourceforge/%downloadn/%downloadn-%realversion.tar.gz |
5 |
< |
Requires: python |
6 |
< |
Requires: zlib |
7 |
< |
# Requires: agg |
8 |
< |
# Requires: cairo |
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 |
> |
|
5 |
|
Requires: py2-numpy |
6 |
< |
# py2-numpy is now built using its internal lapack_lite. |
11 |
< |
# uncomment if otherwise. |
12 |
< |
# Requires: atlas lapack |
6 |
> |
Requires: zlib |
7 |
|
Requires: libpng |
14 |
– |
# Requires: freetype |
15 |
– |
Patch0: matplotlib-0.90.1 |
8 |
|
%prep |
9 |
< |
%setup -n %downloadn-%realversion |
10 |
< |
%patch0 -p0 |
11 |
< |
perl -p -i -e "s|\@LIBPNG_ROOT\@|$LIBPNG_ROOT|;s|\@ZLIB_ROOT\@|$ZLIB_ROOT|" setupext.py |
9 |
> |
%setup -n matplotlib-%{realversion} |
10 |
> |
|
11 |
> |
cat >> setup.cfg <<- EOF |
12 |
> |
[build_ext] |
13 |
> |
include_dirs = $LIBPNG_ROOT/include:$ZLIB_ROOT/include:/usr/X11R6/include:/usr/X11R6/include/freetype2 |
14 |
> |
library_dirs = $LIBPNG_ROOT/lib:$ZLIB_ROOT/lib:/usr/X11/lib |
15 |
> |
EOF |
16 |
> |
|
17 |
|
%build |
18 |
+ |
# Pick up the system compiler also when building with gcc 4.6.1 on mac. |
19 |
+ |
case %cmsos in |
20 |
+ |
osx*_*_gcc421) ;; |
21 |
+ |
osx*) |
22 |
+ |
export CC=/usr/bin/gcc |
23 |
+ |
export CXX=/usr/bin/c++ |
24 |
+ |
;; |
25 |
+ |
esac |
26 |
+ |
python setup.py build |
27 |
+ |
|
28 |
|
%install |
29 |
|
python -c 'import numpy' |
30 |
|
python setup.py install --prefix=%i |
31 |
< |
perl -p -i -e "s|^#!.*python(.*)|#!/usr/bin/env python$1|" `grep -r -e "#\!.*python" %i | cut -d: -f1` |
31 |
> |
find %i -name '*.egg-info' -exec rm {} \; |
32 |
> |
|
33 |
> |
# No need for test files |
34 |
> |
rm -rf %i/$PYTHON_LIB_SITE_PACKAGES/matplotlib/tests |