summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-11-19 12:27:09 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-11-19 12:27:09 +0100
commitff70b774960944b5e91df7b7509ed3209ecf1b3f (patch)
tree7e6b62fe11d473ef8ebb626113beb904b28cbc69
parent5e3bb4491a4f7105f27b4fa16ad26968076812e5 (diff)
downloadaioeventlet-ff70b774960944b5e91df7b7509ed3209ecf1b3f.tar.gz
update setup.py: adjust asyncio dependency
use builtin asyncio, use tulip or use trollus depending on the python version
-rw-r--r--README6
-rw-r--r--setup.py13
2 files changed, 17 insertions, 2 deletions
diff --git a/README b/README
index 3651b49..5ac3d4f 100644
--- a/README
+++ b/README
@@ -16,7 +16,11 @@ Installation
Requirements:
- eventlet (it was tested with eventlet 0.15)
-- trollius 1.0 or newer
+- asyncio or trollius:
+
+ * Python 3.4 and newer: asyncio is now part of the stdlib
+ * Python 3.3: need Tulip 0.4.1 or newer (pip install asyncio)
+ * Python 2.6-3.2: need trollius 1.0 or newer (pip install trollius)
Type::
diff --git a/setup.py b/setup.py
index f48cede..246b78f 100644
--- a/setup.py
+++ b/setup.py
@@ -23,6 +23,17 @@ except ImportError:
# We won't be able to build the Wheel file on Windows.
from distutils.core import setup, Extension
+requirements = ['eventlet']
+if sys.version_info >= (3, 4):
+ # Python 3.4 and newer: asyncio is now part of the stdlib
+ pass
+elif (3, 3) <= sys.version_info < (3, 4):
+ # Python 3.3: use Tulip
+ requirements.append('asyncio>=0.4.1')
+else:
+ # Python 2.6-3.2: use Trollius
+ requirements.append('trollius>=1.0')
+
with open("README") as fp:
long_description = fp.read()
@@ -47,6 +58,6 @@ install_options = {
#"test_suite": "runtests.runtests",
}
if SETUPTOOLS:
- install_options['install_requires'] = ['eventlet', 'trollius>=1.0']
+ install_options['install_requires'] = requirements
setup(**install_options)