forked from getslash/slash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtravis_build.py
More file actions
32 lines (26 loc) · 809 Bytes
/
travis_build.py
File metadata and controls
32 lines (26 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! /usr/bin/python
from __future__ import print_function
import subprocess
import sys
import os
_PYPY = hasattr(sys, "pypy_version_info")
def _execute(cmd):
if 0 != subprocess.call(cmd, shell=True):
sys.exit(-1)
if __name__ == '__main__':
print("Running from", os.path.abspath("."))
deps = [
"nose",
"pyforge",
"lxml", # for XSD validations
]
if not _PYPY:
deps.append("pylint>=1.0.0")
if sys.version_info < (2, 7):
deps.append("unittest2")
_execute("pip install --use-mirrors {0}".format(" ".join(repr(dep) for dep in deps)))
_execute("python setup.py develop")
if not _PYPY:
_execute("pylint --rcfile=.pylintrc setup.py")
_execute("pylint --rcfile=.pylintrc slash")
_execute("nosetests -w tests")