-cat > ${INSTALL_WORK}/try_native.py <<EOF
-import sys
-try :
- import Numeric
- sys.exit(0)
-except ImportError, r :
- sys.exit(1)
-EOF
-python ${INSTALL_WORK}/try_native.py
-if [ $? -eq 0 ] ; then
- pythonpath="`find_in_path _numpy.so ${PYTHONPATH}`"
- tmp="${pythonpath} ${pythonpath} \${PYTHONPATH} ${PYTHONPATH}";
- pythonpath=`sort_path ${tmp}`
- cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+numpath=`python -c "import Numeric; print Numeric.__file__" 2>/dev/null`
+if [ -n "${numpath}" ] ; then
+ numpath=`dirname ${numpath}`
+ 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}'`
+ if [ $ver -ge 2200 ] ; then
+ tmp="${numpath} ${numpath} \${PYTHONPATH} ${PYTHONPATH}";
+ pythonpath=`sort_path ${tmp}`
+ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF