diff options
-rw-r--r-- | .travis.yml | 1 | ||||
-rwxr-xr-x | testsuite/install.sh | 18 |
2 files changed, 13 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index c8f0c4c71..f51637ccd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,6 +42,7 @@ addons: cache: directories: - $HOME/.cache/pip + - $HOME/.cache/wheels - $HOME/.cache/xml before_cache: - rm -f $HOME/.cache/pip/log/debug.log 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 |