summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-02-27 00:06:13 -0500
committerChris McDonough <chrism@plope.com>2012-02-27 00:06:13 -0500
commit602453189d12fd31288d605d053a8e66841f2453 (patch)
tree2b1dd9312b678bbb72282ef2080fef589c9fd164 /setup.py
parent648c557b0327a2384d479d668ecb7c42317d892a (diff)
downloadpyramid-602453189d12fd31288d605d053a8e66841f2453.tar.gz
pyramid-602453189d12fd31288d605d053a8e66841f2453.tar.bz2
pyramid-602453189d12fd31288d605d053a8e66841f2453.zip
separate checks for Python version numbers for 2 and 3
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 94292361c..6e8119065 100644
--- a/setup.py
+++ b/setup.py
@@ -17,10 +17,16 @@ import sys
from setuptools import setup, find_packages
-if sys.version_info[:2] < (2, 6):
- raise RuntimeError('Requires Python 2.6 or better')
+py_version = sys.version_info[:2]
-PY3 = sys.version_info[0] == 3
+PY3 = py_version[0] == 3
+
+if PY3:
+ if py_version < (3, 2):
+ raise RuntimeError('On Python 3, Pyramid requires Python 3.2 or better')
+else:
+ if py_version < (2, 6):
+ raise RuntimeError('On Python 2, Pyramid requires Python 2.6 or better')
here = os.path.abspath(os.path.dirname(__file__))
try: