2014-07-05 22:54:00 -04:00
|
|
|
import os
|
|
|
|
from os import path
|
|
|
|
|
|
|
|
from invoke import task, run
|
|
|
|
|
2014-07-22 20:19:52 -04:00
|
|
|
|
2014-07-05 22:54:00 -04:00
|
|
|
@task
|
|
|
|
def docs():
|
2014-07-22 20:19:52 -04:00
|
|
|
"""Build Sphinx documentation."""
|
2014-07-05 22:54:00 -04:00
|
|
|
build_dir = '_build'
|
|
|
|
if not path.exists(build_dir):
|
|
|
|
os.mkdir(build_dir)
|
|
|
|
run('sphinx-build -b slides . _build')
|
|
|
|
|
2014-07-22 20:19:52 -04:00
|
|
|
|
2014-07-05 22:54:00 -04:00
|
|
|
@task
|
|
|
|
def clean():
|
2014-07-22 20:19:52 -04:00
|
|
|
"""Clean generated files."""
|
2014-07-05 22:54:00 -04:00
|
|
|
run('rm *.pyc')
|
|
|
|
run('rm _build -rv')
|
|
|
|
|