From d76566d62507ad1dfc6aeb1d78cde40884d84a71 Mon Sep 17 00:00:00 2001 From: kennyballou Date: Mon, 29 Oct 2012 19:31:10 -0600 Subject: Add self-build file --- build.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 build.py (limited to 'build.py') 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"]) -- cgit v1.2.1