fixing Python 2.6 dependency issue

pull/133/head
mattsb42-aws 2018-02-09 11:18:01 -08:00
parent f31ff816e7
commit b0b141cf75
3 changed files with 9 additions and 3 deletions

View File

@ -5,3 +5,4 @@ pycryptodomex; python_version == '3.2'
pycryptodomex; python_version == '3.3'
cryptography; python_version >= '3.4'
pyasn1>=0.2.3
ordereddict; python_version < '2.7'

View File

@ -60,11 +60,16 @@ if py_version < (2, 7) or (py_version >= (3, 0) and py_version < (3, 4)):
else:
crypto_lib = 'cryptography'
requires = ['pyasn1>=0.2.3', 'pysmi', crypto_lib]
if py_version < (2, 7):
requires.append('ordereddict')
try:
from setuptools import setup
params = {
'install_requires': ['pyasn1>=0.2.3', 'pysmi', crypto_lib],
'install_requires': requires,
'zip_safe': True
}
@ -78,7 +83,7 @@ except ImportError:
params = {}
if py_version > (2, 4):
params['requires'] = ['pyasn1(>=0.2.3)', 'pysmi', crypto_lib]
params['requires'] = requires
doclines = [x.strip() for x in (__doc__ or '').split('\n') if x]

View File

@ -1,5 +1,5 @@
[envlist]
envlist = py{27,34,35,36}
envlist = py{26,27,34,35,36}
[testenv]
commands = {toxinidir}/runtests.sh