Get numpy build going again. Numpy requires Cython but Cython was removed in
r29557 which caused the build to fail. Numpy build fails are reported as a
warning so it's easy to miss.
@@ -150,6 +150,10 @@ function bv_python_info
export SETUPTOOLS_FILE=${SETUPTOOLS_FILE:-"setuptools-28.0.0.tar.gz"}
export SETUPTOOLS_BUILD_DIR=${SETUPTOOLS_BUILD_DIR:-"setuptools-28.0.0"}
+ export CYTHON_URL=${CYTHON_URL:-"https://pypi.python.org/packages/c6/fe/97319581905de40f1be7015a0ea1bd336a756f6249914b148a17eefa75dc/"}
+ export CYTHON_FILE=${CYTHON_FILE:-"Cython-0.25.2.tar.gz"}
+ export CYTHON_BUILD_DIR=${CYTHON_BUILD_DIR:-"Cython-0.25.2"}
+
export NUMPY_URL=${NUMPY_URL:-"https://pypi.python.org/packages/16/f5/b432f028134dd30cfbf6f21b8264a9938e5e0f75204e72453af08d67eb0b/"}
export NUMPY_FILE=${NUMPY_FILE:-"numpy-1.11.2.tar.gz"}
export NUMPY_BUILD_DIR=${NUMPY_BUILD_DIR:-"numpy-1.11.2"}
@@ -351,7 +355,6 @@ function build_python
PYTHON_CPPFLAGS="-I ${OPENSSL_INCLUDE}"
fi
-
if [[ "$OPSYS" == "AIX" ]]; then
info "Configuring Python (AIX): ./configure OPT=\"$PYTHON_OPT\" CXX=\"$cxxCompiler\" CC=\"$cCompiler\"" \
"--prefix=\"$PYTHON_PREFIX_DIR\" --disable-ipv6"
@@ -367,6 +370,7 @@ function build_python
${PYTHON_SHARED} \
--prefix="$PYTHON_PREFIX_DIR" --disable-ipv6
fi
+
if [[ $? != 0 ]] ; then
warn "Python configure failed. Giving up"
return 1
@@ -649,6 +653,14 @@ function build_numpy
fi
fi
+ if ! test -f ${CYTHON_FILE} ; then
+ download_file ${CYTHON_FILE}
+ if [[ $? != 0 ]] ; then
+ warn "Could not download ${CYTHON_FILE}"
+ return 1
+ fi
+ fi
+
if ! test -f ${NUMPY_FILE} ; then
download_file ${NUMPY_FILE}
if [[ $? != 0 ]] ; then
@@ -683,6 +695,11 @@ function build_numpy
${PYHOME}/bin/python ./setup.py install --prefix="${PYHOME}"
popd > /dev/null
+ pushd $CYTHON_BUILD_DIR > /dev/null
+ info "Installing cython (~ 2 min) ..."
+ ${PYHOME}/bin/python ./setup.py install --prefix="${PYHOME}"
+ popd > /dev/null
+
pushd $NUMPY_BUILD_DIR > /dev/null
info "Installing numpy (~ 2 min) ..."
${PYHOME}/bin/python ./setup.py install --prefix="${PYHOME}"
