1 |
< |
### RPM external py2-matplotlib 0.87.7 |
2 |
< |
Requires: gcc-wrapper |
3 |
< |
## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages |
4 |
< |
%define downloadn matplotlib |
5 |
< |
Source: http://switch.dl.sourceforge.net/sourceforge/%downloadn/%downloadn-%v.tar.gz |
6 |
< |
Requires: python |
7 |
< |
# Requires: zlib |
8 |
< |
# Requires: agg |
9 |
< |
# Requires: cairo |
10 |
< |
Requires: py2-numpy |
11 |
< |
# py2-numpy is now built using its internal lapack_lite. |
12 |
< |
# uncomment if otherwise. |
13 |
< |
# Requires: atlas lapack |
14 |
< |
Requires: libpng |
15 |
< |
# Requires: freetype |
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 |
> |
|
6 |
|
%prep |
7 |
< |
%setup -n %downloadn-%v |
7 |
> |
%setup -n matplotlib-%{realversion} |
8 |
> |
|
9 |
> |
cat >> setup.cfg <<- EOF |
10 |
> |
[build_ext] |
11 |
> |
include_dirs = $LIBPNG_ROOT/include:$ZLIB_ROOT/include:/usr/X11R6/include:/usr/X11R6/include/freetype2 |
12 |
> |
library_dirs = $LIBPNG_ROOT/lib:$ZLIB_ROOT/lib:/usr/X11/lib |
13 |
> |
|
14 |
> |
[gui_support] |
15 |
> |
gtk = False |
16 |
> |
gtkagg = False |
17 |
> |
tkagg = False |
18 |
> |
wxagg = False |
19 |
> |
macosx = False |
20 |
> |
EOF |
21 |
> |
|
22 |
> |
rm -f freetype2 |
23 |
> |
ln -s $FREETYPE_ROOT/include freetype2 |
24 |
|
|
25 |
|
%build |
26 |
< |
## IMPORT gcc-wrapper |
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 |