summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authormattsb42-aws <bullocm@amazon.com>2018-02-09 09:24:10 -0800
committermattsb42-aws <bullocm@amazon.com>2018-02-09 11:12:29 -0800
commitab945c536a582d64e0fb051f534ce844d13534c4 (patch)
tree1bda080b2ebd7a6d09481e1f04a04852fa05f920 /setup.py
parent9306d4b04006b52772208b2b84ad6117f9ee7288 (diff)
downloadpysnmp-git-ab945c536a582d64e0fb051f534ce844d13534c4.tar.gz
streamlining version handling
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 4313d08f..c9981b85 100644
--- a/setup.py
+++ b/setup.py
@@ -50,11 +50,11 @@ def howto_install_setuptools():
""")
-if sys.version_info[:2] < (2, 4):
+py_version = sys.version_info[:2]
+if py_version < (2, 4):
print("ERROR: this package requires Python 2.4 or later!")
sys.exit(1)
-py_version = sys.version_info[:2]
if py_version < (2, 7) or (py_version >= (3, 0) and py_version < (3, 4)):
crypto_lib = 'pycryptodomex'
else:
@@ -77,7 +77,7 @@ except ImportError:
from distutils.core import setup
params = {}
- if sys.version_info[:2] > (2, 4):
+ if py_version > (2, 4):
params['requires'] = ['pyasn1(>=0.2.3)', 'pysmi', crypto_lib]
doclines = [x.strip() for x in (__doc__ or '').split('\n') if x]