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.
This commit is contained in:
benoitc 2014-05-13 15:18:43 +02:00
parent 67800292e0
commit 14f71ebf39

View File

@ -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]