#!/bin/bash set -e if which virtualenv >/dev/null; then echo else sudo easy_install "virtualenv>=1.8.4" if [ $? -ne 0 ]; then echo "failed to install virtualenv, you'll have to fix this yourself" exit 1 fi fi if [ -z "$VIRTUAL_ENV" ] then virtualenv .tox/tox cd .tox/tox source bin/activate #exit 1 fi if [ -z "$VIRTUAL_ENV" ] then echo This script should only be run inside a virtual_env. exit 1 fi easy_install "tox>=1.3" #pip install tox --upgrade -v # pytest pytest-cov python setup.py check --restructuredtext --strict autopep8 -i -r src/*.py # commented some errors temporarly, TODO: remove them and fix the code pep8 --max-line-length=180 --ignore=E502,E128,E123,E127,E125 src tox -v $@ if [ $? -ne 0 ]; then echo "Error: tox returned error code $?" else echo "Done." fi