diff options
| author | Michael Merickel <michael@merickel.org> | 2016-11-26 15:19:52 -0600 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2016-11-26 15:19:52 -0600 |
| commit | fa0da6844171e4d983092de1421a385f81f604d2 (patch) | |
| tree | c3b3191e6923a70f8b70467a90d0b4ddf0b156be /setup.py | |
| parent | 52bfe0a8f2f6d305f0e3d8cead290427fd71e926 (diff) | |
| download | pyramid-fa0da6844171e4d983092de1421a385f81f604d2.tar.gz pyramid-fa0da6844171e4d983092de1421a385f81f604d2.tar.bz2 pyramid-fa0da6844171e4d983092de1421a385f81f604d2.zip | |
only warn about py33, do not error
this is squashed by pip unfortunately but it's better than a hard error
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -14,19 +14,21 @@ import os import sys +import warnings from setuptools import setup, find_packages py_version = sys.version_info[:2] -PY3 = py_version[0] == 3 +PY2 = py_version[0] == 2 -if PY3: - if py_version < (3, 4): - raise RuntimeError('On Python 3, Pyramid requires Python 3.4 or better') -else: - if py_version < (2, 7): - raise RuntimeError('On Python 2, Pyramid requires Python 2.7 or better') +if (3, 0) <= py_version < (3, 4): + warnings.warn( + 'On Python 3, Pyramid only supports Python 3.4 or better', + UserWarning, + ) +elif py_version < (2, 7): + raise RuntimeError('On Python 2, Pyramid requires Python 2.7 or better') here = os.path.abspath(os.path.dirname(__file__)) try: @@ -53,7 +55,7 @@ tests_require = [ 'WebTest >= 1.3.1', # py3 compat ] -if not PY3: +if PY2: tests_require.append('zope.component>=3.11.0') docs_extras = [ |
