wscript 949 B

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