|
- #!/usr/bin/env python
- """
- The main purpose of this file is to run tox only with the current existing python interpretors.
- """
- import os
- import sys
- import logging
-
- if __name__ == "__main__":
- log = logging.getLogger()
-
- # now we'll detect which python interpretors we have on this machine and run the tests for all of them
- #'python2.5':'py25',
- known_pys = { 'python2.6':'py26', 'python2.7':'py27' } # ,'python3':'py3', 'python3.2':'py32', 'python4':'py4'}
- #known_pys = { 'python2.7':'py27' } # ,'python3':'py3', 'python3.2':'py32', 'python4':'py4'}
-
- detected_pys = set()
- for known_py in known_pys:
- if os.system("which %s >/dev/null" % known_py) == 0:
- detected_pys.add(known_pys[known_py])
- #detected_pys.add('docs')
-
- #os.system("python setup.py test")
-
-
- cmds = ["autopep8 --ignore=E501 -i *.py tendo/*.py demo/*.py",
- #"pep8",
- "./tox -e %s" % ",".join(detected_pys)]
- for cmd in cmds:
- if os.system(cmd) != 0:
- print("ERROR: Command `%s` failed, testing stopped here." % cmd)
- sys.exit(6)
|