From cc2317de601e8727e9f5e20dc2c5054ec7ef8e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kl=C3=B6ckner?= Date: Tue, 28 May 2019 05:04:15 +0200 Subject: [PATCH] Handle $EXTRA_INSTALL in CI script --- build-and-test-py-project.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/build-and-test-py-project.sh b/build-and-test-py-project.sh index 69b5b8e..0810a38 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 -- GitLab