wscript (949B)
1 #!/usr/bin/env python 2 # encoding: utf-8 3 # Jérôme Carretero, 2010 (zougloub) 4 5 import sys, os 6 from waflib.Utils import subprocess 7 8 """ 9 """ 10 11 top = '.' 12 out = 'build' 13 14 def options(opt): 15 opt.load('daemon', tooldir=['../../playground/daemon/']) 16 17 def configure(cfg): 18 cfg.find_program('dot', var='DOT') 19 cfg.find_program('convert', var='CONVERT') 20 cfg.load('daemon', tooldir=['../../playground/daemon/']) 21 cfg.find_program("sphinx-build", var="SPHINX_BUILD") 22 cfg.env.SPHINX_ARGS = ['-W'] 23 24 def build(bld): 25 bld.path.make_node('_static').mkdir() 26 bld( 27 rule = "${SPHINX_BUILD} ${SPHINX_ARGS} -b html -d %s . %s" % (os.path.join(out, "doctrees"), os.path.join(out, "html")), 28 cwd = bld.path, 29 source = bld.path.parent.parent.find_dir('waflib').ant_glob('**/*.py') 30 + bld.path.ant_glob('**/*.rst') 31 + bld.path.ant_glob('_templates/indexcontent.html') 32 + bld.path.ant_glob('conf.py'), 33 target = bld.path.find_or_declare('html/index.html') 34 ) 35