.travis/run.sh: use pyenv only on osx; run tox as module

This commit is contained in:
Cosimo Lupo 2016-12-25 18:09:10 +00:00
parent dcf246a356
commit 2edbed92f8
No known key found for this signature in database
GPG Key ID: B61AAAD0B53A6419

View File

@ -3,19 +3,12 @@
set -e
set -x
if [[ "$(uname -s)" == "Darwin" || "${TOXENV}" == "pypy" || "${TOXENV}" == "jython" ]]; then
if [[ "$(uname -s)" == "Darwin" ]]; then
PYENV_ROOT="$HOME/.pyenv"
PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
fi
if [[ "${TOXENV}" == "jython" ]]; then
# tox is not working with Jython, so here we simply call py.test ourselves.
# See: https://bitbucket.org/hpk42/tox/issues/326/oserror-not-a-directory-when-creating-env
# We also ignore any error for now, until we fix the many test failures...
pyenv global jython-2.7.1b3
jython -m pytest || true
else
source ~/.venv/bin/activate
tox
fi
# tox script may not be in the $PATH if we installed as --user
# so we run it as module
python -m tox