From a662180fd3334b4f9f01b1cda99df1852b0fa577 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Thu, 22 Mar 2012 14:51:27 +0100 Subject: [PATCH] Make importlib dependency conditional on the Python version. --- setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b1672af..61bacbc 100644 --- a/setup.py +++ b/setup.py @@ -15,10 +15,13 @@ def get_version(): raise RuntimeError('No version info found.') def get_dependencies(): - deps = ['redis', 'procname', 'importlib', 'times'] + deps = ['redis', 'procname', 'times'] deps += ['logbook'] # should be soft dependency? 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'] return deps