1717# directory as buildscripts/jenkins-build
1818#
1919
20+ # Set options to echo every command and exit on error
21+ set -xe
22+
2023# Require a version of Python to be selected
2124if [ " ${PYTHON_VERSION} " == " " ]; then
2225 echo You must select a Python version with the PYTHON_VERSION variable.
@@ -40,17 +43,22 @@ rm -rf build
4043# Get libdynd into the libraries subdirectory
4144# TODO: Build libdynd in a separate jenkins project,
4245# and use its build artifact here.
43- ./buildscripts/checkout_libdynd.sh || exit 1
46+ rm -rf libraries
47+ mkdir libraries
48+ pushd libraries
49+ git clone https://github.com/ContinuumIO/libdynd.git
50+ popd
4451
4552# Make sure binstar is installed in the main environment
4653echo Updating binstar...
47- ~ /anaconda/bin/conda install --yes binstar || exit 1
54+ ~ /anaconda/bin/conda install --yes binstar
4855~ /anaconda/bin/binstar --version
4956
5057# Use conda to create a conda environment of the required
5158# python version and containing the dependencies.
5259export PYENV_PREFIX=${WORKSPACE} /build/pyenv
53- ~ /anaconda/bin/python ./buildscripts/create_conda_pyenv_retry.py ${PYTHON_VERSION} ${PYENV_PREFIX} || exit 1
60+ rm -rf ${PYENV_PREFIX}
61+ ~ /anaconda/bin/conda create --yes -p ${PYENV_PREFIX} python=${PYTHON_VERSION} cython scipy nose
5462export PATH=${PYENV_PREFIX} /bin:${PATH}
5563
5664if [ -f " ${PYENV_PREFIX} /bin/python" ]; then
@@ -74,21 +82,16 @@ export EXTRA="-DDYND_BUILD_TESTS=OFF ${EXTRA}"
7482
7583# Create a fresh makefile with cmake, and do the build/install
7684cd build
77- echo cmake ${EXTRA} \
78- -DCMAKE_INSTALL_PREFIX=${PYENV_PREFIX} \
79- -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} \
80- -DCMAKE_C_COMPILER=${CC} \
81- -DCMAKE_CXX_COMPILER=${CXX} ..
8285cmake ${EXTRA} \
8386 -DCMAKE_INSTALL_PREFIX=${PYENV_PREFIX} \
8487 -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} \
8588 -DCMAKE_C_COMPILER=${CC} \
86- -DCMAKE_CXX_COMPILER=${CXX} .. || exit 1
87- make VERBOSE=1 || exit 1
88- make install || exit 1
89+ -DCMAKE_CXX_COMPILER=${CXX} ..
90+ make VERBOSE=1
91+ make install
8992
9093# Run the unit tests
91- ${PYTHON_EXECUTABLE} -c ' import dynd;dynd.test(xunitfile="../test_results.xml", exit=1)' || exit 1
94+ ${PYTHON_EXECUTABLE} -c ' import dynd;dynd.test(xunitfile="../test_results.xml", exit=1)'
9295
9396# Retrieve the version number
9497export PYDYND_VERSION=` ${PYTHON_EXECUTABLE} -c ' import dynd;print(dynd.__version__)' `
115118fi
116119
117120# Create a conda package from the build
118- ~ /anaconda/bin/conda package -p ${PYENV_PREFIX} --pkg-name=dynd-python --pkg-version=${PYDYND_VERSION} || exit 1
121+ ~ /anaconda/bin/conda package -p ${PYENV_PREFIX} --pkg-name=dynd-python --pkg-version=${PYDYND_VERSION}
119122
120123# Upload the package to binstar
121- ~ /anaconda/bin/binstar -t ${BINSTAR_AUTH} upload --force dynd-python* .tar.bz2 || exit 1
124+ ~ /anaconda/bin/binstar -t ${BINSTAR_AUTH} upload --force dynd-python* .tar.bz2
122125
123126cd ..
0 commit comments