Skip to content

Commit

Permalink
travis: fixes for tox 2.0 (env)
Browse files Browse the repository at this point in the history
 - write PIP_WHEELHOUSE into travis_pip_install script
 - pass TESTS_SKIP_LIVESERVER/TESTS_USE_PHANTOMJS via "passenv"

tox 2.0 won't use (most of) the parent env anymore by default.

[ci skip]: passed in https://travis-ci.org/yourlabs/django-autocomplete-light/builds/62715708
  • Loading branch information
blueyed committed May 15, 2015
1 parent c5c66aa commit a7053db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,18 @@ install:
- mkdir -p bin
- PATH=$PWD/bin:$PATH
- PIP_INSTALL=bin/travis_pip_install
- PIP_WHEELHOUSE=$PWD/wheelhouse
- printf '#!/bin/bash -x\n' > $PIP_INSTALL
- declare -f travis_retry >> $PIP_INSTALL
- printf '\necho "=====\nUsing pip-wrapper for \"$@\"\n=====\n" >&2\n' >> $PIP_INSTALL
# Handle "pip install -e" for usedevelop from tox.
- printf '\nif [ "$1" = "-e" ]; then pip install "$@"; exit $?; fi\n' >> $PIP_INSTALL
# First try to install from wheelhouse.
- printf 'for i in "$@"; do pip install --no-index --find-links=${PIP_WHEELHOUSE} "$i"; done\n' >> $PIP_INSTALL
- printf "for i in \"\$@\"; do pip install --no-index --find-links=${PIP_WHEELHOUSE} \"\$i\"; done\n" >> $PIP_INSTALL
# Then upgrade in case of outdated wheelhouse.
- printf 'for i in "$@"; do travis_retry pip install --upgrade "$i"; done\n' >> $PIP_INSTALL
# ..and add the new/current wheels.
- printf 'pip wheel --wheel-dir=${PIP_WHEELHOUSE} --find-links=${PIP_WHEELHOUSE} "$@"\n' >> $PIP_INSTALL
- printf "pip wheel --wheel-dir=${PIP_WHEELHOUSE} --find-links=${PIP_WHEELHOUSE} \"\$@\"\n" >> $PIP_INSTALL
- chmod +x $PIP_INSTALL

# Adjust tox.ini.
Expand All @@ -70,9 +71,6 @@ install:
- cat $PIP_INSTALL
- cat tox.ini

# Create wheels (skips existing ones from the cached wheelhouse).
- export PIP_WHEELHOUSE=$PWD/wheelhouse

- travis_pip_install tox
- if [ -n "$EXTRAREQ" ]; then travis_pip_install $EXTRAREQ; fi

Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ setenv =
DJANGO_SETTINGS_MODULE=test_project.settings
PIP_ALLOW_EXTERNAL=true
PYTHONPATH=test_project
passenv = TESTS_SKIP_LIVESERVER TESTS_USE_PHANTOMJS

[testenv:checkqa]
basepython = python3.4
Expand Down

0 comments on commit a7053db

Please sign in to comment.