]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fail somewhat more gracefully when using Python < 2.5.
authorGeorg Brandl <georg@python.org>
Wed, 15 Aug 2007 17:25:27 +0000 (17:25 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 15 Aug 2007 17:25:27 +0000 (17:25 +0000)
Doc/tools/sphinx-build.py

index 20516b642b5fb8c97971bef4d2023c7f5ea90534..8c9331e0efb3ce30ddd53648f9e65b5f481329c2 100644 (file)
 import sys
 
 if __name__ == '__main__':
+
+    if sys.version_info[:3] < (2, 5, 0):
+        print >>sys.stderr, """\
+Error: Sphinx needs to be executed with Python 2.5 or newer.
+(If you run this from the Makefile, you can set the PYTHON variable
+to the path of an alternative interpreter executable.)
+"""
+        sys.exit(1)
+
     from sphinx import main
     sys.exit(main(sys.argv))