Skip to content

Commit

Permalink
fix pyzmq check in setupext to handle 2.1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Oct 30, 2011
1 parent 602e3c3 commit f9cd1da
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions setupext/setupext.py
Expand Up @@ -136,13 +136,25 @@ def check_for_pyzmq():
try:
import zmq
except ImportError:
print_status('pyzmq', "no (required for qtconsole and parallel computing capabilities)")
print_status('pyzmq', "no (required for qtconsole, notebook, and parallel computing capabilities)")
return False
else:
# pyzmq 2.1.10 adds pyzmq_version_info funtion for returning
# version as a tuple
if hasattr(zmq, 'pyzmq_version_info'):
if zmq.pyzmq_version_info() >= (2,1,4):
print_status("pyzmq", zmq.__version__)
return True
else:
# this branch can never occur, at least until we update our
# pyzmq dependency beyond 2.1.10
return False
# this is necessarily earlier than 2.1.10, so string comparison is
# okay
if zmq.__version__ < '2.1.4':
print_status('pyzmq', "no (have %s, but require >= 2.1.4 for"
" qtconsole and parallel computing capabilities)"%zmq.__version__)

return False
else:
print_status("pyzmq", zmq.__version__)
return True
Expand Down

0 comments on commit f9cd1da

Please sign in to comment.