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
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''Run Sphinx, the Python documentation tool.
First try running Sphinx installed in the current
Python build. If that fails, try the standard
``sphinx-build`` command which may be installed in
a different Python version. If that fails, punt.
Originals at *http://sphinx.pocoo.org/*.
'''
import sys
try:
from sphinx import main
sys.exit(main(sys.argv))
except ImportError:
pass
# Sphinx not installed in this Python build,
# try running the original sphinx-build
import os
os.execlp('sphinx-build', *sys.argv)
|