From a4b902c95c42a7851d7047c6e099eafb3319cb1d Mon Sep 17 00:00:00 2001 From: Rob Galanakis Date: Fri, 25 Jul 2014 13:24:16 -0500 Subject: [PATCH] setup.py will now install gevent if stackless cannot be imported. --- goless/__init__.py | 2 +- setup.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/goless/__init__.py b/goless/__init__.py index b06fdd8..ee6050e 100644 --- a/goless/__init__.py +++ b/goless/__init__.py @@ -22,7 +22,7 @@ from .selecting import dcase, rcase, scase, select -version_info = 0, 7, 0 +version_info = 0, 7, 1 version = '.'.join([str(v) for v in version_info]) __version__ = version diff --git a/setup.py b/setup.py index 87ae7d9..daa4713 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,14 @@ from goless import version, __author__, __email__, __url__, __license__ +# If stackless isn't found, then assume gevent needs to be installed. +requires = [] +try: + # noinspection PyUnresolvedReferences + import stackless +except ImportError: + requires.append('gevent>=1.0') + setup( name='goless', version=version, @@ -14,6 +22,7 @@ 'threading async gevent go golang', url=__url__, packages=['goless'], + install_requires=requires, classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', @@ -22,7 +31,11 @@ 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', ], test_suite='tests', )