From 4f3cb4335c6d934c34d851efa587c525e6fcd876 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 23 Mar 2017 20:19:34 +0100 Subject: 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. --- testsuite/install.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'testsuite') 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 -- cgit v1.2.3-1-g7c22