Add libzmq version info builder

This commit is contained in:
Bo Maryniuk 2018-02-14 10:12:06 +01:00
parent 0b4a17b859
commit 948368e9a1

View file

@ -17,10 +17,12 @@ except ImportError:
ZMQDefaultLoop = None
ZMQ_VERSION_INFO = (-1, -1, -1)
LIBZMQ_VERSION_INFO = (-1, -1, -1)
try:
if zmq:
ZMQ_VERSION_INFO = [int(v_el) for v_el in zmq.__version__.split('.')]
ZMQ_VERSION_INFO = tuple([int(v_el) for v_el in zmq.__version__.split('.')])
LIBZMQ_VERSION_INFO = tuple([int(v_el) for v_el in zmq.zmq_version().split('.')])
if ZMQ_VERSION_INFO[0] > 16: # 17.0.x+ deprecates zmq's ioloops
ZMQDefaultLoop = tornado.ioloop.IOLoop
except Exception as ex: