forked from erikrose/blessings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fabfile.py
38 lines (23 loc) · 773 Bytes
/
fabfile.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
32
33
34
35
36
37
38
"""Run this using ``fabric``.
I can't remember any of this syntax on my own.
"""
from functools import partial
from os import environ
from os.path import abspath, dirname
from fabric.api import local, cd
local = partial(local, capture=False)
ROOT = abspath(dirname(__file__))
environ['PYTHONPATH'] = (((environ['PYTHONPATH'] + ':') if
environ.get('PYTHONPATH') else '') + ROOT)
def doc(kind='html'):
"""Build Sphinx docs.
Requires Sphinx to be installed.
"""
with cd('docs'):
local('make clean %s' % kind)
def updoc():
"""Build Sphinx docs and upload them to packages.python.org.
Requires Sphinx-PyPI-upload to be installed.
"""
doc('html')
local('python setup.py upload_sphinx --upload-dir=docs/_build/html')