summaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
authorkennyballou <kballou@onyx.boisestate.edu>2012-10-29 19:31:10 -0600
committerkballou <kballou@onyx.boisestate.edu>2012-10-29 19:31:10 -0600
commitd76566d62507ad1dfc6aeb1d78cde40884d84a71 (patch)
tree34bc1443055ed31e7e0810363cf6b1490c27a62f /build.py
parenta5129ee3d699734addc7af1ce6762be29b49267f (diff)
downloadxnt-d76566d62507ad1dfc6aeb1d78cde40884d84a71.tar.gz
xnt-d76566d62507ad1dfc6aeb1d78cde40884d84a71.tar.xz
Add self-build file
Diffstat (limited to 'build.py')
-rw-r--r--build.py44
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"])