Skip to content

Commit

Permalink
Don't install gaiohttp if python < 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Jun 22, 2014
1 parent 68cd2b9 commit 86f7404
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@


import os
from setuptools import setup, find_packages, Command
from setuptools import setup, Command
import sys

from gunicorn import __version__


ASYNCIO_COMPAT = sys.version_info >= (3, 3)


CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Environment :: Other Environment',
Expand Down Expand Up @@ -65,6 +68,17 @@ def run(self):

REQUIREMENTS = []

py_modules = []

for root, folders, files in os.walk('gunicorn'):
for f in files:
if f.endswith('.py') and (ASYNCIO_COMPAT or f != 'gaiohttp.py'):
full = os.path.join(root, f[:-3])
parts = full.split(os.path.sep)
modname = '.'.join(parts)
py_modules.append(modname)


setup(
name = 'gunicorn',
version = __version__,
Expand All @@ -78,7 +92,7 @@ def run(self):

classifiers = CLASSIFIERS,
zip_safe = False,
packages = find_packages(exclude=['examples', 'tests']),
py_modules = py_modules,
include_package_data = True,

tests_require = tests_require,
Expand Down

0 comments on commit 86f7404

Please sign in to comment.