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)
20 ctx.run("rm -rf build")
21 ctx.run("rm -rf dist")
22 ctx.run("rm -rf anteater.egg-info")
29 ctx.run("rm -rf %s" % build_dir)
34 ctx.run("open %s" % os.path.join(build_dir, 'index.html'))
38 def build_docs(ctx, clean=False, browse=False):
41 ctx.run("sphinx-build %s %s" % (docs_dir, build_dir), pty=True)
47 def readme(ctx, browse=False):
48 ctx.run('rst2html.py README.rst > README.html')
53 """Build source distribution and wheels."""
54 ctx.run('python setup.py sdist bdist_wheel')
58 def publish(ctx, test=False):
59 """Publish to the cheeseshop.
61 This command follows the Python packaging guidelines:
62 https://packaging.python.org/tutorials/distributing-packages
64 Information on configuration required for '--test' can be found
65 here: https://wiki.python.org/moin/TestPyPI
67 Before uploading please ensure you've signed the release using:
69 gpg --detach-sign -a dist/package-1.0.1.tar.gz
72 ctx.run('twine upload -r test dist/*')
74 ctx.run("twine upload dist/*")