4 ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null`
5 if [ "$ver" == "23.7" ]; then
12 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
13 #$DELIM ${PRODUCT_TYPE} $DELIM
14 export PYTHONPATH=\${INSTALL_ROOT}/${PRODUCT}/lib/python\${PYTHON_VERSION}/site-packages/Numeric:\${PYTHONPATH}
17 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
18 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
21 # looks for the native product and collects it's environment (used by make_env())
23 numpath=`python -c "import Numeric; print Numeric.__file__" 2>/dev/null`
24 if [ -n "${numpath}" ] ; then
25 numpath=`dirname ${numpath}`
26 ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null | awk -F. '{v=0;for(i=1;i<=NF;i++)v=v*100+$i;print v}'`
27 if [ $ver -ge 2307 ] ; then
28 tmp="${numpath} ${numpath} \${PYTHONPATH} ${PYTHONPATH}";
29 pythonpath=`sort_path ${tmp}`
30 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
31 #$DELIM ${PRODUCT_TYPE} $DELIM
32 export PYTHONPATH=${pythonpath}
35 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
36 if [ $ver -eq 2307 ] ; then
47 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
53 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
54 source ${INSTALL_WORK}/$SHRC
56 makedir ${PRODUCT_DIR}
58 check_jb tar xfz ${SOURCE_DIR}/Numeric-23.7.tar.gz -C ${INSTALL_WORK}
61 # check existence of lapack, f77blas, cblas, atlas libraries
63 check_lib_version liblapack.so
64 if [ "$?" -ne "0" ] ; then
67 if [ "$found" -eq "1" ] ; then
68 check_lib_version libf77blas.so
69 if [ "$?" -ne "0" ] ; then
73 if [ "$found" -eq "1" ] ; then
74 check_lib_version libcblas.so
75 if [ "$?" -ne "0" ] ; then
79 if [ "$found" -eq "1" ] ; then
80 check_lib_version libatlas.so
81 if [ "$?" -ne "0" ] ; then
85 # if any library is not found modify build procedure
86 if [ "$found" -eq "0" ] ; then
87 cp setup.py setup.py.orig
88 sed -e "s%^use_dotblas = 1%use_dotblas = 0%g" -e "s%^libraries_list = \['lapack', 'cblas', 'f77blas', 'atlas', 'g2c'\]%libraries_list = \['g2c'\]%g" setup.py.orig > setup.py
92 check_job ${PRODUCT_DIR}/INSTALL.LOG python setup.py install --prefix=${PRODUCT_DIR}
94 #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
95 cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
101 check_jb tar xfz ${SOURCE_DIR}/Numeric-23.7.tar.gz -C ${INSTALL_ROOT}
107 export INSTALL_WORK=$2;
108 export SOURCE_DIR=$3;
109 export INSTALL_ROOT=$4;
110 export PRODUCT_SEQUENCE=$5;
111 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="numeric" ; fi
112 export PRODUCT="Numeric-23.7"
113 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
114 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}