/Doc/tools/sphinx-build.py

http://unladen-swallow.googlecode.com/ · Python · 24 lines · 12 code · 4 blank · 8 comment · 2 complexity · 2a63a1920e39b5807ca132f66baa6a1b MD5 · raw file

  1. # -*- coding: utf-8 -*-
  2. """
  3. Sphinx - Python documentation toolchain
  4. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. :copyright: 2007 by Georg Brandl.
  6. :license: Python license.
  7. """
  8. import sys
  9. if __name__ == '__main__':
  10. if sys.version_info[:3] < (2, 4, 0):
  11. print >>sys.stderr, """\
  12. Error: Sphinx needs to be executed with Python 2.4 or newer
  13. (If you run this from the Makefile, you can set the PYTHON variable
  14. to the path of an alternative interpreter executable, e.g.,
  15. ``make html PYTHON=python2.5``).
  16. """
  17. sys.exit(1)
  18. from sphinx import main
  19. sys.exit(main(sys.argv))