diff options
author | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2017-03-23 20:19:34 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2017-03-29 13:29:58 +0200 |
commit | 4f3cb4335c6d934c34d851efa587c525e6fcd876 (patch) | |
tree | c869940977e808f5ff184925e2df4f7ff21380c9 /testsuite/install.sh | |
parent | c5529d8979672d4cf92d4ba54ce01256ca1d0842 (diff) | |
download | bcfg2-4f3cb4335c6d934c34d851efa587c525e6fcd876.tar.gz bcfg2-4f3cb4335c6d934c34d851efa587c525e6fcd876.tar.bz2 bcfg2-4f3cb4335c6d934c34d851efa587c525e6fcd876.zip |
travis-ci: Cache wheels for python deps
The python dependencies are only build once to create the wheel and
cached using the travis-ci infrastructure. All builds afterwards
will be faster because the cached version is used.
Diffstat (limited to 'testsuite/install.sh')
-rwxr-xr-x | testsuite/install.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/testsuite/install.sh b/testsuite/install.sh index 1c9cc36b9..eb569ec56 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -1,25 +1,31 @@ #!/bin/bash -ex # install script for Travis-CI +pip install --upgrade pip -pip install -r testsuite/requirements.txt +pip_wheel() { + pip wheel --find-links="$HOME/.cache/wheels/" --wheel-dir="$HOME/.cache/wheels/" "$@" + pip install --no-index --find-links="$HOME/.cache/wheels/" "$@" +} + +pip_wheel -r testsuite/requirements.txt PYVER=$(python -c 'import sys;print(".".join(str(v) for v in sys.version_info[0:2]))') if [[ ${PYVER:0:1} == "2" && $PYVER != "2.7" ]]; then - pip install unittest2 + pip_wheel unittest2 fi if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then - pip install PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy python-augeas + pip_wheel PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy python-augeas if [[ ${PYVER:0:1} == "2" ]]; then - pip install cheetah m2crypto + pip_wheel cheetah m2crypto if [[ $PYVER != "2.7" ]]; then - pip install 'django<1.7' 'South<0.8' + pip_wheel 'django<1.7' 'South<0.8' else - pip install django + pip_wheel django fi fi fi |