summaryrefslogtreecommitdiff
path: root/pavement.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-03-27 11:14:39 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-03-27 11:14:39 +0000
commit57fc6f53283986d221651a434145ea3510f07040 (patch)
tree233e2d50fdefe6ad0f37b75f7bb903519f52480d /pavement.py
parent958f4a4e7c6c66e7509c745f77e1826e3159df4f (diff)
downloadnumpy-57fc6f53283986d221651a434145ea3510f07040.tar.gz
Add bootstrap task.
Diffstat (limited to 'pavement.py')
-rw-r--r--pavement.py34
1 files changed, 31 insertions, 3 deletions
diff --git a/pavement.py b/pavement.py
index ad7175267..b3e0d6e24 100644
--- a/pavement.py
+++ b/pavement.py
@@ -1,4 +1,5 @@
import os
+import sys
import subprocess
try:
from hash import md5
@@ -29,8 +30,35 @@ HTML_DESTDIR = paver.path.path('build') / 'html'
RELEASE = 'doc/release/1.3.0-notes.rst'
LOG_START = 'tags/1.2.0'
LOG_END = 'master'
+BOOTSTRAP_DIR = "bootstrap"
+BOOTSTRAP_PYEXEC = "%s/bin/python" % BOOTSTRAP_DIR
+BOOTSTRAP_SCRIPT = "%s/bootstrap.py" % BOOTSTRAP_DIR
-options(sphinx=Bunch(builddir="build", sourcedir="source", docroot='doc'))
+options(sphinx=Bunch(builddir="build", sourcedir="source", docroot='doc'),
+ virtualenv=Bunch(script_name=BOOTSTRAP_SCRIPT))
+
+# Bootstrap stuff
+@task
+def bootstrap():
+ """create virtualenv in ./install"""
+ install = paver.path.path(BOOTSTRAP_DIR)
+ if not install.exists():
+ install.mkdir()
+ call_task('paver.virtual.bootstrap')
+ sh('cd %s; %s bootstrap.py' % (BOOTSTRAP_DIR, sys.executable))
+
+@task
+def clean():
+ """Remove build, dist, egg-info garbage."""
+ d = ['build', 'dist']
+ for i in d:
+ paver.path.path(i).rmtree()
+
+ (paver.path.path('doc') / options.sphinx.builddir).rmtree()
+
+@task
+def clean_bootstrap():
+ paver.path.path('bootstrap').rmtree()
# NOTES/Changelog stuff
def compute_md5():
@@ -74,11 +102,11 @@ def write_release():
def write_log():
write_log_task()
-# Doc build stuff
+# Doc stuff
@task
@needs('paver.doctools.html')
def html(options):
"""Build numpy documentation and put it into build/docs"""
- builtdocs = paver.path.path("docs") / options.sphinx.builddir / "html"
+ builtdocs = paver.path.path("doc") / options.sphinx.builddir / "html"
HTML_DESTDIR.rmtree()
builtdocs.copytree(HTML_DESTDIR)