'check the zmq version'

def check_zmq_version(self):

    cfg = self.config
    zmq_prefix = cfg['zmq_prefix']
    detected = self.test_build(zmq_prefix, self.compiler_settings)
    vers = tuple(detected['vers'])
    vs = v_str(vers)
    if cfg['allow_legacy_libzmq']:
        min_zmq = min_legacy_zmq
    else:
        min_zmq = min_good_zmq
    if (vers < min_zmq):
        msg = [('Detected    ZMQ    version:    %s,    but    require    ZMQ    >=    %s' % (vs, v_str(min_zmq)))]
        if zmq_prefix:
            msg.append(('                ZMQ_PREFIX=%s' % zmq_prefix))
        if (vers >= min_legacy_zmq):
            msg.append('                Explicitly    allow    legacy    zmq    by    specifying    `--zmq=/zmq/prefix`')
        raise LibZMQVersionError('\n'.join(msg))
    if (vers < min_good_zmq):
        msg = [('Detected    legacy    ZMQ    version:    %s.    It    is    STRONGLY    recommended    to    use    ZMQ    >=    %s' % (vs, v_str(min_good_zmq)))]
        if zmq_prefix:
            msg.append(('                ZMQ_PREFIX=%s' % zmq_prefix))
        warn('\n'.join(msg))
    elif (vers < target_zmq):
        warn(('Detected    ZMQ    version:    %s,    but    pyzmq    targets    ZMQ    %s.' % (vs, v_str(target_zmq))))
        warn(('libzmq    features    and    fixes    introduced    after    %s    will    be    unavailable.' % vs))
        line()
    elif (vers >= dev_zmq):
        warn(('Detected    ZMQ    version:    %s.    Some    new    features    in    libzmq    may    not    be    exposed    by    pyzmq.' % vs))
        line()
    if sys.platform.startswith('win'):
        local_dll = localpath('zmq', (libzmq_name + '.dll'))
        if ((not zmq_prefix) and (not os.path.exists(local_dll))):
            fatal("ZMQ    directory    must    be    specified    on    Windows    via    setup.cfg    or    'python    setup.py    configure    --zmq=/path/to/zeromq2'")
        try:
            shutil.copy(pjoin(zmq_prefix, 'lib', (libzmq_name + '.dll')), local_dll)
        except Exception:
            if (not os.path.exists(local_dll)):
                warn((((('Could    not    copy    ' + libzmq_name) + '    into    zmq/,    which    is    usually    necessary    on    Windows.Please    specify    zmq    prefix    via    configure    --zmq=/path/to/zmq    or    copy    ') + libzmq_name) + '    into    zmq/    manually.'))
