diff options
Diffstat (limited to 'sphinx/__init__.py')
-rw-r--r-- | sphinx/__init__.py | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/sphinx/__init__.py b/sphinx/__init__.py index 91b960e6..0c68ad32 100644 --- a/sphinx/__init__.py +++ b/sphinx/__init__.py @@ -5,7 +5,7 @@ The Sphinx documentation toolchain. - :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -15,8 +15,8 @@ import sys from os import path -__version__ = '1.1.3+' -__released__ = '1.1.3' # used when Sphinx builds its own docs +__version__ = '1.2pre' +__released__ = '1.2 (hg)' # used when Sphinx builds its own docs package_dir = path.abspath(path.dirname(__file__)) @@ -38,11 +38,20 @@ if '+' in __version__ or 'pre' in __version__: def main(argv=sys.argv): """Sphinx build "main" command-line entry.""" - if sys.version_info[:3] < (2, 4, 0): + if sys.version_info[:3] < (2, 5, 0): sys.stderr.write('Error: Sphinx requires at least ' - 'Python 2.4 to run.\n') + 'Python 2.5 to run.\n') return 1 - + if sys.version_info[:3] >= (3, 3, 0): + try: + import docutils + x, y = docutils.__version__.split('.')[:2] + if (int(x), int(y)) < (0, 10): + sys.stderr.write('Error: Sphinx requires at least ' + 'Docutils 0.10 for Python 3.3 and above.\n') + return 1 + except Exception: + pass try: from sphinx import cmdline except ImportError: |