docs: def autodocs():
      "create Sphinx docs locally, and start a watchdog"
      build_dir = path('docs/_build')
      index_html = build_dir / 'html/index.html'
      if build_dir.exists():
          build_dir.rmtree()
  
      with pushd("docs"):
          print "\n*** Generating API doc ***\n"
          sh("sphinx-apidoc -o apidoc -f -T -M ../src/pyrocore")
          sh("sphinx-apidoc -o apidoc -f -T -M $(dirname $(python -c 'import tempita; print(tempita.__file__)'))")
          print "\n*** Generating HTML doc ***\n"
          sh('nohup %s/Makefile SPHINXBUILD="sphinx-autobuild -p %d'
             ' -i \'.*\' -i \'*.log\' -i \'*.png\' -i \'*.txt\'" html >autobuild.log 2>&1 &'
             % (os.getcwd(), SPHINX_AUTOBUILD_PORT))
  
      for i in range(25):
          time.sleep(2.5)
          pid = watchdog_pid()
          if pid:
              sh("touch docs/index.rst")
              sh('ps {}'.format(pid))
              url = 'http://localhost:{port:d}/'.format(port=SPHINX_AUTOBUILD_PORT)
              print("\n*** Open '{}' in your browser...".format(url))
              break