diff --git a/.travis.yml b/.travis.yml index 29eedd43a..0a5f75c1f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,8 @@ matrix: - CDECIMAL=m3-cdecimal - os: linux python: pypy + - os: linux + python: pypy3 - os: linux python: 3.3 - os: linux diff --git a/setup.py b/setup.py index 7e70a0320..85c8b6d19 100755 --- a/setup.py +++ b/setup.py @@ -1,25 +1,16 @@ # -*- coding: utf-8 -*- +import subprocess 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) - +from distutils.cmd import Command -import os -import subprocess from setuptools import setup -from babel import __version__ - -sys.path.append(os.path.join('doc', 'common')) try: - from doctools import build_doc, test_doc -except ImportError: - build_doc = test_doc = None - - -from distutils.cmd import Command + 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) class import_cldr(Command): @@ -33,8 +24,7 @@ def finalize_options(self): pass def run(self): - c = subprocess.Popen([sys.executable, 'scripts/download_import_cldr.py']) - c.wait() + subprocess.check_call([sys.executable, 'scripts/download_import_cldr.py']) setup( @@ -61,6 +51,7 @@ def run(self): 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules', ], packages=['babel', 'babel.messages', 'babel.localtime'], @@ -72,8 +63,7 @@ def run(self): 'pytz>=0a', ], - cmdclass={'build_doc': build_doc, 'test_doc': test_doc, - 'import_cldr': import_cldr}, + cmdclass={'import_cldr': import_cldr}, zip_safe=False,