1 # -*- coding: utf-8 -*-
2 from __future__ import absolute_import
3 from __future__ import print_function
7 from invoke import task, run
10 build_dir = os.path.join(docs_dir, '_build')
15 run('python setup.py test', pty=True)
22 run("rm -rf anteater.egg-info")
29 run("rm -rf %s" % build_dir)
34 run("open %s" % os.path.join(build_dir, 'index.html'))
38 def build_docs(clean=False, browse=False):
41 run("sphinx-build %s %s" % (docs_dir, build_dir), pty=True)
47 def readme(browse=False):
48 run('rst2html.py README.rst > README.html')
52 def publish(test=False):
53 """Publish to the cheeseshop."""
55 run('python setup.py register -r test sdist upload -r test')
57 run("python setup.py register sdist upload")