summaryrefslogtreecommitdiffhomepage
path: root/tasks.py
diff options
context:
space:
mode:
authorSebastian Deiss <s.deiss@science-computing.de>2014-03-26 11:39:26 +0100
committerSebastian Deiss <s.deiss@science-computing.de>2014-03-26 11:39:26 +0100
commita23d9bc654b5278f1ab43df825ed559e4f9a2332 (patch)
tree593ae35cd2b7f550f5b9ff3d4babac57f072e741 /tasks.py
parent5407b1a27468d5abedde93b51aad5bd97bd046c4 (diff)
parentbd8f96d33a3e1ee6162540a6f230ef93e435528a (diff)
Merge branch 'master' into gssapi-py3-support
Conflicts: .gitignore README demos/demo_simple.py dev-requirements.txt paramiko/__init__.py paramiko/_winapi.py paramiko/agent.py paramiko/auth_handler.py paramiko/ber.py paramiko/buffered_pipe.py paramiko/channel.py paramiko/client.py paramiko/common.py paramiko/dsskey.py paramiko/ecdsakey.py paramiko/file.py paramiko/hostkeys.py paramiko/kex_gex.py paramiko/kex_group1.py paramiko/message.py paramiko/packet.py paramiko/pkey.py paramiko/primes.py paramiko/proxy.py paramiko/py3compat.py paramiko/server.py paramiko/sftp_client.py paramiko/transport.py paramiko/util.py paramiko/win_pageant.py setup.py sites/shared_conf.py sites/www/changelog.rst sites/www/conf.py sites/www/index.rst sites/www/installing.rst test.py tests/loop.py tests/stub_sftp.py tests/test_auth.py tests/test_client.py tests/test_file.py tests/test_hostkeys.py tests/test_kex.py tests/test_message.py tests/test_packetizer.py tests/test_pkey.py tests/test_sftp.py tests/test_sftp_big.py tests/test_transport.py tests/test_util.py
Diffstat (limited to 'tasks.py')
-rw-r--r--tasks.py49
1 files changed, 49 insertions, 0 deletions
diff --git a/tasks.py b/tasks.py
new file mode 100644
index 00000000..38282b8e
--- /dev/null
+++ b/tasks.py
@@ -0,0 +1,49 @@
+from os import mkdir
+from os.path import join
+from shutil import rmtree, copytree
+
+from invoke import Collection, ctask as task
+from invocations import docs as _docs
+from invocations.packaging import publish
+
+
+d = 'sites'
+
+# Usage doc/API site (published as docs.paramiko.org)
+docs_path = join(d, 'docs')
+docs_build = join(docs_path, '_build')
+docs = Collection.from_module(_docs, name='docs', config={
+ 'sphinx.source': docs_path,
+ 'sphinx.target': docs_build,
+})
+
+# Main/about/changelog site ((www.)?paramiko.org)
+www_path = join(d, 'www')
+www = Collection.from_module(_docs, name='www', config={
+ 'sphinx.source': www_path,
+ 'sphinx.target': join(www_path, '_build'),
+})
+
+
+# Until we move to spec-based testing
+@task
+def test(ctx):
+ ctx.run("python test.py --verbose")
+
+@task
+def coverage(ctx):
+ ctx.run("coverage run --source=paramiko test.py --verbose")
+
+
+# Until we stop bundling docs w/ releases. Need to discover use cases first.
+@task('docs') # Will invoke the API doc site build
+def release(ctx):
+ # Move the built docs into where Epydocs used to live
+ target = 'docs'
+ rmtree(target, ignore_errors=True)
+ copytree(docs_build, target)
+ # Publish
+ publish(ctx, wheel=True)
+
+
+ns = Collection(test, coverage, release, docs=docs, www=www)