-
Notifications
You must be signed in to change notification settings - Fork 14
/
tasks.py
31 lines (24 loc) · 834 Bytes
/
tasks.py
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
from __future__ import print_function
from conans.client import tools
from dl_conan_build_tools.tasks import conan
from invoke import Collection, task, call
from invoke.tasks import Task
from sys import platform
import os
import shutil
@task
def distclean(ctx):
"""Clean up the project to its pristine distribution state. Undoes the effects of bootstrap."""
paths = ['build', 'build_tools/build']
for path in paths:
if os.path.exists(path):
print("Removing " + path)
shutil.rmtree(path)
@task(pre=[conan.login])
def bootstrap(ctx):
"""Set up Conan, log in, and install Conan dependencies."""
pass
# Make a top level task list for this module
tasks = [v for v in locals().values() if isinstance(v, Task)]
ns = Collection(conan, *tasks)
ns.configure({'run': {'echo': 'true'}})