You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

47 lines
837 B

  1. #!/bin/bash
  2. set -e
  3. if which virtualenv >/dev/null; then
  4. echo
  5. else
  6. sudo easy_install "virtualenv>=1.8.4"
  7. if [ $? -ne 0 ]; then
  8. echo "failed to install virtualenv, you'll have to fix this yourself"
  9. exit 1
  10. fi
  11. fi
  12. if [ -z "$VIRTUAL_ENV" ]
  13. then
  14. virtualenv .tox/tox
  15. cd .tox/tox
  16. source bin/activate
  17. #exit 1
  18. fi
  19. if [ -z "$VIRTUAL_ENV" ]
  20. then
  21. echo This script should only be run inside a virtual_env.
  22. exit 1
  23. fi
  24. easy_install "tox>=1.3"
  25. #pip install tox --upgrade -v
  26. # pytest pytest-cov
  27. python setup.py check --restructuredtext --strict
  28. autopep8 -i -r src/*.py
  29. # commented some errors temporarly, TODO: remove them and fix the code
  30. pep8 --max-line-length=180 --ignore=E502,E128,E123,E127,E125 src
  31. tox -v $@
  32. if [ $? -ne 0 ]; then
  33. echo "Error: tox returned error code $?"
  34. else
  35. echo "Done."
  36. fi