diff --git a/.travis.yml b/.travis.yml index 3eb89dc4f..0be5eba1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,14 @@ language: python sudo: false +cache: + directories: + - $HOME/.wheelhouse + env: + global: + - WHEEL_DIR=$HOME/.wheelhouse/ + matrix: - TOX_ENV=py27-flake8 - TOX_ENV=py27-docs - TOX_ENV=py34-django17 @@ -31,3 +38,4 @@ install: script: - tox -e $TOX_ENV + - rm -rf $WHEEL_DIR/djangorestframework*.whl diff --git a/custom_pip_install.sh b/custom_pip_install.sh new file mode 100755 index 000000000..5aee09b64 --- /dev/null +++ b/custom_pip_install.sh @@ -0,0 +1,4 @@ +#!/bin/bash +pip install wheel==0.24.0 +pip wheel --wheel-dir=${WHEEL_DIR} --find-links=${WHEEL_DIR} "$@" +pip install --no-index --find-links=${WHEEL_DIR} "$@" diff --git a/tox.ini b/tox.ini index c986250c5..aa964e871 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,9 @@ envlist = {py27,py32,py33,py34}-django{17,18beta} [testenv] +install_command = + {toxinidir}/custom_pip_install.sh {opts} {packages} + commands = ./runtests.py --fast setenv = PYTHONDONTWRITEBYTECODE=1