Skip to content

Commit

Permalink
Declare dependencies in setup.py for automatic installation.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdarnell committed Feb 20, 2011
1 parent c7b118f commit 19f850e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@
except ImportError:
pass

# Build the epoll extension for Linux systems with Python < 2.6
extensions = []
major, minor = sys.version_info[:2]
python_26 = (major > 2 or (major == 2 and minor >= 6))

requirements = ["pycurl"]
if not python_26:
# Python 2.6 includes a json module in the standard library
requirements.append("simplejson")

# Build the epoll extension for Linux systems with Python < 2.6
extensions = []
if "linux" in sys.platform.lower() and not python_26:
extensions.append(distutils.core.Extension(
"tornado.epoll", ["tornado/epoll.c"]))
Expand All @@ -42,6 +48,7 @@
"tornado.test": ["README", "test.crt", "test.key"],
},
ext_modules = extensions,
install_requires = requirements,
author="Facebook",
author_email="[email protected]",
url="http://www.tornadoweb.org/",
Expand Down

0 comments on commit 19f850e

Please sign in to comment.