From a30129669f320e83b05261d1ece04324a937b0db Mon Sep 17 00:00:00 2001 From: Theo Date: Thu, 31 Aug 2017 09:45:26 +0100 Subject: [PATCH] Fixed #867 Simplified code in setup.py --- setup.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/setup.py b/setup.py index 7e2e48c..54c9bf7 100644 --- a/setup.py +++ b/setup.py @@ -9,20 +9,22 @@ from setuptools import setup, find_packages def get_version(): basedir = os.path.dirname(__file__) - with open(os.path.join(basedir, 'rq/version.py')) as f: - locals = {} - exec(f.read(), locals) - return locals['VERSION'] - raise RuntimeError('No version info found.') + try: + with open(os.path.join(basedir, 'rq/version.py')) as f: + locals = {} + exec(f.read(), locals) + return locals['VERSION'] + except FileNotFoundError: + raise RuntimeError('No version info found.') def get_dependencies(): deps = ['redis >= 2.7.0', 'click >= 5.0'] if sys.version_info < (2, 7) or \ - (sys.version_info >= (3, 0) and sys.version_info < (3, 1)): + ((3, 0) <= 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)): + ((3, 0) <= sys.version_info < (3, 2)): deps += ['argparse'] return deps @@ -56,13 +58,13 @@ setup( }, classifiers=[ # As from http://pypi.python.org/pypi?%3Aaction=list_classifiers - #'Development Status :: 1 - Planning', - #'Development Status :: 2 - Pre-Alpha', - #'Development Status :: 3 - Alpha', - #'Development Status :: 4 - Beta', + # 'Development Status :: 1 - Planning', + # 'Development Status :: 2 - Pre-Alpha', + # 'Development Status :: 3 - Alpha', + # 'Development Status :: 4 - Beta', 'Development Status :: 5 - Production/Stable', - #'Development Status :: 6 - Mature', - #'Development Status :: 7 - Inactive', + # 'Development Status :: 6 - Mature', + # 'Development Status :: 7 - Inactive', 'Intended Audience :: Developers', 'Intended Audience :: End Users/Desktop', 'Intended Audience :: Information Technology',