diff options
author | kennyballou <kballou@onyx.boisestate.edu> | 2012-10-29 19:31:10 -0600 |
---|---|---|
committer | kballou <kballou@onyx.boisestate.edu> | 2012-10-29 19:31:10 -0600 |
commit | d76566d62507ad1dfc6aeb1d78cde40884d84a71 (patch) | |
tree | 34bc1443055ed31e7e0810363cf6b1490c27a62f /build.py | |
parent | a5129ee3d699734addc7af1ce6762be29b49267f (diff) | |
download | xnt-d76566d62507ad1dfc6aeb1d78cde40884d84a71.tar.gz xnt-d76566d62507ad1dfc6aeb1d78cde40884d84a71.tar.xz |
Add self-build file
Diffstat (limited to 'build.py')
-rw-r--r-- | build.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/build.py b/build.py new file mode 100644 index 0000000..094a89e --- /dev/null +++ b/build.py @@ -0,0 +1,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"]) |