forked from pyinvoke/invoke
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtasks.py
More file actions
31 lines (25 loc) · 832 Bytes
/
tasks.py
File metadata and controls
31 lines (25 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
import shutil
from invocations import docs
from invocations.testing import test
from invocations.packaging import vendorize, release
from invoke import ctask as task, run, Collection
@task(name='tree')
def doctree(ctx):
ctx.run("tree -Ca -I \".git|*.pyc|*.swp|dist|*.egg-info|_static|_build\" docs")
@task
def vendorize_pexpect(version):
target = 'invoke/vendor'
package = 'pexpect'
vendorize(
distribution="pexpect-u",
package=package,
version=version,
vendor_dir=target,
license='LICENSE', # TODO: autodetect this in vendorize
)
# Nuke test dir inside package hrrgh
shutil.rmtree(os.path.join(target, package, 'tests'))
docs = Collection.from_module(docs)
docs.add_task(doctree)
ns = Collection(test, vendorize, release, docs, vendorize_pexpect)