Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | """ |
| 3 | Sphinx - Python documentation toolchain |
| 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 5 | |
| 6 | :copyright: 2007 by Georg Brandl. |
| 7 | :license: Python license. |
| 8 | """ |
| 9 | |
| 10 | import sys |
| 11 | |
| 12 | if __name__ == '__main__': |
Guido van Rossum | da27fd2 | 2007-08-17 00:24:54 +0000 | [diff] [blame] | 13 | |
Georg Brandl | fd5359c | 2007-08-31 06:20:46 +0000 | [diff] [blame^] | 14 | if not (2, 5, 1) <= sys.version_info[:3] < (3, 0, 0): |
| 15 | sys.stderr.write("""\ |
| 16 | Error: Sphinx needs to be executed with Python 2.5.1 or newer (not 3.0 though). |
| 17 | If you run this from the Makefile, you can set the PYTHON variable to the path |
| 18 | of an alternative interpreter executable, e.g., ``make html PYTHON=python2.5``.) |
| 19 | """) |
Guido van Rossum | da27fd2 | 2007-08-17 00:24:54 +0000 | [diff] [blame] | 20 | sys.exit(1) |
| 21 | |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 22 | from sphinx import main |
| 23 | sys.exit(main(sys.argv)) |