diff --git a/build-and-test-py-project.sh b/build-and-test-py-project.sh index 69b5b8e52030ce6724392b5f0261687ada3301b5..0810a3871a048bb83a6f317e6eba1fbc8dc00fa3 100644 --- a/build-and-test-py-project.sh +++ b/build-and-test-py-project.sh @@ -59,6 +59,26 @@ $PIP install setuptools # Install before a newer version gets pulled in as a dependency $PIP install pytest==3.0.4 pytest-warnings==0.2.0 +if test "$EXTRA_INSTALL" != ""; then + for i in $EXTRA_INSTALL ; do + if [ "$i" = "numpy" ] && [[ "${PY_EXE}" == pypy* ]]; then + $PIP install git+https://bitbucket.org/pypy/numpy.git + elif [[ "$i" = *pybind11* ]] && [[ "${PY_EXE}" == pypy* ]]; then + # Work around https://github.com/pypa/virtualenv/issues/1198 + # Running virtualenv --always-copy or -m venv --copies should also do the trick. + L=$(readlink .env/include) + rm .env/include + cp -R $L .env/include + + $PIP install $i + elif [ "$i" = "numpy" ] && [[ "${PY_EXE}" == python2.6* ]]; then + $PIP install 'numpy==1.10.4' + else + $PIP install $i + fi + done +fi + if test "$REQUIREMENTS_TXT" == ""; then REQUIREMENTS_TXT="requirements.txt" fi