From 60dbf4f2ca44f32c51b54d9812edf3daada231a7 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sun, 9 Aug 2015 11:23:01 +0200 Subject: [PATCH] setup: Add conditional dependency for importlib --- setup.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a275915..27e369f 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,14 @@ from setuptools import setup, find_packages +install_requirements = ['six==1.5.2', 'pytz', 'tzlocal'] + version = '0.10.0' +try: + import importlib +except ImportError: + install_requirements.append('importlib') + setup( name='tasklib', version=version, @@ -15,7 +22,7 @@ setup( packages=find_packages(), include_package_data=True, test_suite='tasklib.tests', - install_requires=['six==1.5.2', 'pytz', 'tzlocal'], + install_requires=install_requirements, classifiers=[ 'Development Status :: 4 - Beta', 'Programming Language :: Python', -- 2.39.5