File: sphinx-build.py

package info (click to toggle)
libapache2-mod-python 3.5.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,864 kB
  • sloc: python: 7,471; ansic: 7,025; makefile: 296; lex: 246; sh: 212
file content (28 lines) | stat: -rw-r--r-- 755 bytes parent folder | download | duplicates (4)
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
28
# -*- coding: utf-8 -*-
"""
    Sphinx - Python documentation toolchain
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    :copyright: 2007-2010 by Georg Brandl.
    :license: Python license.
"""

import sys
import warnings

# Get rid of UserWarnings reported by pkg_resources.
warnings.filterwarnings('ignore', category=UserWarning, module='jinja2')

if __name__ == '__main__':

    if sys.version_info[:3] < (2, 4, 0):
        print >>sys.stderr, """\
Error: Sphinx needs to be executed with Python 2.4 or newer
(If you run this from the Makefile, you can set the PYTHON variable
to the path of an alternative interpreter executable, e.g.,
``make html PYTHON=python2.5``).
"""
        sys.exit(1)

    from sphinx import main
    sys.exit(main(sys.argv))