ยปCore Development>Code coverage>Doc/tools/sphinx-build.py

Python code coverage for Doc/tools/sphinx-build.py

#countcontent
1n/a# -*- coding: utf-8 -*-
2n/a"""
3n/a Sphinx - Python documentation toolchain
4n/a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5n/a
6n/a :copyright: 2007-2010 by Georg Brandl.
7n/a :license: Python license.
8n/a"""
9n/a
10n/aimport sys
11n/aimport warnings
12n/a
13n/a# Get rid of UserWarnings reported by pkg_resources.
14n/awarnings.filterwarnings('ignore', category=UserWarning, module='jinja2')
15n/a
16n/aif __name__ == '__main__':
17n/a
18n/a if sys.version_info[:3] < (2, 4, 0):
19n/a sys.stderr.write("""\
20n/aError: Sphinx needs to be executed with Python 2.4 or newer (not 3.0 though).
21n/a(If you run this from the Makefile, you can set the PYTHON variable
22n/ato the path of an alternative interpreter executable, e.g.,
23n/a``make html PYTHON=python2.5``).
24n/a""")
25n/a sys.exit(1)
26n/a
27n/a from sphinx import main
28n/a sys.exit(main(sys.argv))