Ticket #9808: spkg-install.2

File spkg-install.2, 1.2 KB (added by fbissey, 11 years ago)

new replacement for scipy

Line 
1#!/usr/bin/env bash
2# These flags confuse numpy's distutils.   In particular,
3# if they are set empty bad things happen.
4
5unset CFLAGS CXXFLAGS SHAREDFLAGS
6
7if [ `uname` = "Darwin" ]; then
8    unset ATLAS
9    unset BLAS
10    unset LAPACK
11    export LDFLAGS="-bundle -undefined dynamic_lookup"
12else
13    ATLAS="$SAGE_LOCAL" 
14    export ATLAS
15    BLAS="$SAGE_LOCAL"
16    export BLAS
17    LAPACK="$SAGE_LOCAL"
18    export LAPACK
19    export LDFLAGS="-shared"
20fi
21export FC="${SAGE_LOCAL}/bin/sage_fortran"
22export SCIPY_FCONFIG="config_fc --noopt --noarch"
23
24# This avoid problems on some systems -- until we officially
25# support umfpack (which we will likely do, since cvxopt
26# I think includes it).
27#   http://projects.scipy.org/pipermail/scipy-user/2006-July/008661.html
28# (Currently swig gets invoked by scipy when building the umfpack interace,
29# which is bad.)
30
31UMFPACK="None"; export UMFPACK
32rm -rf "$SAGE_LOCAL"/lib/python/site-packages/scipy
33
34cd src/
35
36if [ $? -ne 0 ]; then
37    echo "Error patching setup.py"
38    exit 1
39fi 
40
41# Build
42python setup.py build ${SCIPY_FCONFIG}
43if [ $? -ne 0 ]; then
44    echo "Error building scipy."
45    exit 1
46fi
47
48# Intall
49python setup.py install ${SCIPY_FCONFIG}
50if [ $? -ne 0 ]; then
51    echo "Error installing scipy."
52    exit 1
53fi
54