]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Declare dependencies in setup.py for automatic installation.
authorBen Darnell <ben@bendarnell.com>
Sun, 20 Feb 2011 20:16:43 +0000 (12:16 -0800)
committerBen Darnell <ben@bendarnell.com>
Sun, 20 Feb 2011 20:16:43 +0000 (12:16 -0800)
setup.py

index 544b553e44b84b9b32f37ac096c0d12397cb74e0..38011a057859339e0477aee7fbe683cc77a4a189 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -23,10 +23,16 @@ try:
 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"]))
@@ -42,6 +48,7 @@ distutils.core.setup(
         "tornado.test": ["README", "test.crt", "test.key"],
         },
     ext_modules = extensions,
+    install_requires = requirements,
     author="Facebook",
     author_email="python-tornado@googlegroups.com",
     url="http://www.tornadoweb.org/",