File: sphinx.py

package info (click to toggle)
pympler 1.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,196 kB
  • sloc: python: 9,816; javascript: 2,775; makefile: 17
file content (27 lines) | stat: -rwxr-xr-x 595 bytes parent folder | download | duplicates (2)
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)