summaryrefslogtreecommitdiff
path: root/build.py
blob: 094a89e9da659e92b79325587d44839a45813028 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python

from xnt import target
from xnt.tasks import *
import xnt.tasks

@target
def clean():
    """Removes Generated folders"""
    rm("Xnt.egg-info",
       "build",
       "docs/build",
       "dist",
       "README.html",
       "**/*.pyc",
       "**/**/*.pyc")

@target
def build():
    setup(["build"])

@target
def test():
    """Tests package"""
    print("Python Tests:")
    setup(["test"])
    clean()
    print("Python2 Tests:")
    call(["python2", "setup.py", "test"])
    clean()

@target
def install():
    """Install Xnt"""
    setup(["install", "--user"])
    clean()

@target
def doc():
    """
    Create package documentation
    """
    clean()
    setup(["build_sphinx"])