From 14f71ebf39abfd2d369d331225fc3c66af3a318c Mon Sep 17 00:00:00 2001 From: benoitc Date: Tue, 13 May 2014 15:18:43 +0200 Subject: [PATCH] compatibility with python 2 Add support of the threaded worker on python 2.7. python 2.7 has no futures module. With this change the compatibility module is installed. --- setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.py b/setup.py index 050ab617..36e33853 100644 --- a/setup.py +++ b/setup.py @@ -10,6 +10,7 @@ import sys from gunicorn import __version__ + CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Environment :: Other Environment', @@ -61,6 +62,11 @@ class PyTest(Command): raise SystemExit(errno) +REQUIREMENTS = [] +if sys.version_info[0] == 2: + REQUIREMENTS.append('futures') + + setup( name = 'gunicorn', version = __version__, @@ -80,6 +86,8 @@ setup( tests_require = tests_require, cmdclass = {'test': PyTest}, + install_requires = REQUIREMENTS, + entry_points=""" [console_scripts]