Skip to content

Commit

Permalink
setup.py will now install gevent if stackless cannot be imported.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgalanakis committed Jul 25, 2014
1 parent 7c3520b commit a4b902c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion goless/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -14,6 +22,7 @@
'threading async gevent go golang',
url=__url__,
packages=['goless'],
install_requires=requires,
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand All @@ -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',
)

0 comments on commit a4b902c

Please sign in to comment.