With pypy3 advertising itself as py3.2, but still behaving like py3.3,
the check started to become awkward. Plus, it seems to be nicer to
ask for forgiveness rather than permission.
# -*- coding: utf-8 -*-
-import sys
-if sys.version_info < (2, 6) or (3,) <= sys.version_info < (3, 3):
- print("Babel requires Python 2.6, 2.7 or 3.3+")
- sys.exit(1)
-
-
import os
import subprocess
+import sys
+
from setuptools import setup
-from babel import __version__
+try:
+ from babel import __version__
+except SyntaxError as exc:
+ sys.stderr.write("Unable to import Babel (%s). Are you running a supported version of Python?\n" % exc)
+ sys.exit(1)
+
sys.path.append(os.path.join('doc', 'common'))
try: