1 |
< |
### RPM external py2-scipy 0.5.1 |
1 |
> |
### RPM external py2-scipy 0.8.0 |
2 |
|
## INITENV +PATH PYTHONPATH %i/lib/python$(echo $PYTHON_VERSION | cut -d. -f 1,2)/site-packages |
3 |
|
%define downloadn scipy |
4 |
< |
Source: http://switch.dl.sourceforge.net/sourceforge/%downloadn/%downloadn-%v.tar.gz |
4 |
> |
Source: http://switch.dl.sourceforge.net/sourceforge/%downloadn/%downloadn-%{realversion}.tar.gz |
5 |
|
Requires: python |
6 |
|
Requires: py2-numpy |
7 |
< |
Requires: atlas |
7 |
> |
#Requires: atlas |
8 |
> |
Requires: lapack |
9 |
|
%prep |
10 |
< |
%setup -n %downloadn-%v |
10 |
> |
%setup -n %downloadn-%{realversion} |
11 |
|
|
12 |
|
cat > site.cfg <<EOF |
13 |
< |
[atlas] |
14 |
< |
include_dirs = $ATLAS_ROOT/include |
15 |
< |
library_dirs = $ATLAS_ROOT/lib |
16 |
< |
atlas_libs = ptf77blas, ptcblas |
17 |
< |
lapack_libs = lapack_atlas |
13 |
> |
[blas] |
14 |
> |
include_dirs = $LAPACK_ROOT/include |
15 |
> |
library_dirs = $LAPACK_ROOT/lib |
16 |
> |
blas_libs = blas |
17 |
> |
[lapack] |
18 |
> |
include_dirs = $LAPACK_ROOT/include |
19 |
> |
library_dirs = $LAPACK_ROOT/lib |
20 |
> |
lapack_libs = lapack |
21 |
|
EOF |
22 |
|
|
23 |
|
%build |
24 |
|
%install |
25 |
< |
python setup.py install --prefix=%i |
25 |
> |
python setup.py -h |
26 |
> |
python setup.py config_fc --fcompiler=gfortran config_cc install --prefix=%i |
27 |
|
perl -p -i -e "s|^#!.*python(.*)|#!/usr/bin/env python$1|" `grep -r -e "#\!.*python" %i | cut -d: -f1` |
28 |
+ |
|
29 |
+ |
mkdir -p %i/etc/scram.d |
30 |
+ |
cat << \EOF_TOOLFILE >%i/etc/scram.d/py2-scipy.xml |
31 |
+ |
<tool name="py2-scipy" version="%v"> |
32 |
+ |
<client> |
33 |
+ |
<environment name="PY2SHIPY_BASE" default="%i"/> |
34 |
+ |
</client> |
35 |
+ |
<runtime name="PYTHONPATH" value="$PY2SHIPY_BASE/lib/python2.6/site-packages" type="path"/> |
36 |
+ |
</tool> |
37 |
+ |
EOF_TOOLFILE |