Make importlib dependency conditional on the Python version.

This commit is contained in:
Vincent Driessen 2012-03-22 14:51:27 +01:00
parent 6bc173f122
commit a662180fd3
1 changed files with 5 additions and 2 deletions

View File

@ -15,10 +15,13 @@ def get_version():
raise RuntimeError('No version info found.') raise RuntimeError('No version info found.')
def get_dependencies(): def get_dependencies():
deps = ['redis', 'procname', 'importlib', 'times'] deps = ['redis', 'procname', 'times']
deps += ['logbook'] # should be soft dependency? deps += ['logbook'] # should be soft dependency?
if sys.version_info < (2, 7) or \ if sys.version_info < (2, 7) or \
sys.version_info >= (3, 0) and sys.version_info < (3, 2): (sys.version_info >= (3, 0) and sys.version_info < (3, 1)):
deps += ['importlib']
if sys.version_info < (2, 7) or \
(sys.version_info >= (3, 0) and sys.version_info < (3, 2)):
deps += ['argparse'] deps += ['argparse']
return deps return deps