Package list logbook / upstream/0.7.0 scripts / test_setup.py
upstream/0.7.0

Tree @upstream/0.7.0 (Download .tar.gz)

test_setup.py @upstream/0.7.0

9af17e1
 
c2895a0
9af17e1
 
 
 
 
 
 
 
c2895a0
9af17e1
 
c2895a0
9af17e1
 
 
 
 
c2895a0
9af17e1
c2895a0
 
 
 
 
9af17e1
c2895a0
#! /usr/bin/python
import subprocess
import os
import sys

def _execute(*args, **kwargs):
    result = subprocess.call(*args, **kwargs)
    if result != 0:
        sys.exit(result)

if __name__ == '__main__':
    python_version = sys.version_info

    deps = [
        "execnet>=1.0.9",
        "nose",
        "pyzmq",
        "sqlalchemy",
    ]

    if python_version < (2, 7):
        deps.append("unittest2")
    if (3, 2) <= python_version < (3, 3):
        deps.append("markupsafe==0.15")
        deps.append("Jinja2==2.6")
    else:
        deps.append("Jinja2")
    print("Setting up dependencies...")
    _execute([os.path.join(os.path.dirname(sys.executable), "pip"),  "install"] + deps, shell=False)