From a9b0a4628c863d6ed6123338d4dbfa14c7b5d495 Mon Sep 17 00:00:00 2001 From: Rob Galanakis Date: Fri, 25 Jul 2014 14:41:24 -0500 Subject: [PATCH] Version bump. setup.py will install gevent if stackless is not imported *and* we're using Python2. It was too difficult to install gevent from source as part of setup.py, so we just warn instead. Adjusted tox to reflect the less need for explicit dependencies. Address #32, which is fallout from #31 --- goless/__init__.py | 2 +- setup.py | 13 ++++++++++++- tox.ini | 12 +++--------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/goless/__init__.py b/goless/__init__.py index ee6050e..27ad68f 100644 --- a/goless/__init__.py +++ b/goless/__init__.py @@ -22,7 +22,7 @@ from .selecting import dcase, rcase, scase, select -version_info = 0, 7, 1 +version_info = 0, 7, 2 version = '.'.join([str(v) for v in version_info]) __version__ = version diff --git a/setup.py b/setup.py index daa4713..b5686e1 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,6 @@ from setuptools import setup +import sys +import warnings from goless import version, __author__, __email__, __url__, __license__ @@ -8,7 +10,16 @@ # noinspection PyUnresolvedReferences import stackless except ImportError: - requires.append('gevent>=1.0') + # See https://github.com/rgalanakis/goless/issues/21 + # for why we need this (waiting for new gevent version). + if sys.version_info[0] == 3: + warnings.warn( + 'You will need to install gevent from GitHub to use goless with ' + 'gevent under Python3. Run something like ' + '"pip install git+https://github.com/surfly/gevent.git#gevent-egg"' + ) + else: + requires.append('gevent>=1.0') setup( name='goless', diff --git a/tox.ini b/tox.ini index 1881d0b..2c5fbbb 100644 --- a/tox.ini +++ b/tox.ini @@ -9,25 +9,23 @@ deps = mock nose setenv = - GOLESS_BACKEND = gevent + GOLESS_BACKEND = [testenv:26gevent] basepython = python2.6 deps = {[testenv]deps} unittest2 - gevent [testenv:27gevent] -deps = - {[testenv]deps} - gevent [testenv:pypygevent] basepython = pypy deps = {[testenv]deps} git+https://github.com/surfly/gevent.git#gevent-egg +setenv = + GOLESS_BACKEND = gevent ; See https://github.com/rgalanakis/goless/issues/21 ; for why we need this hackery (waiting for new gevent version). @@ -36,8 +34,6 @@ basepython = python3.3 commands = pip install git+https://github.com/surfly/gevent.git#gevent-egg nosetests ./tests -setenv = - GOLESS_BACKEND = deps = {[testenv]deps} cython @@ -48,8 +44,6 @@ basepython = python3.4 commands = pip install git+https://github.com/surfly/gevent.git#gevent-egg nosetests ./tests -setenv = - GOLESS_BACKEND = deps = {[testenv]deps} cython