def check_zmq_version(min_version):
 sv = ver_str(min_version)
 try:
  (found, zmq_h) = find_zmq_version()
  sf = ver_str(found)
  if (found < min_version):
   print ('This pyzmq requires zeromq >= %s' % sv)
   print ('but it appears you are building against %s' % zmq_h)
   print ('which has zeromq %s' % sf)
   sys.exit(1)
 except IOError:
  msg = '\n'.join(["Couldn't find zmq.h to check for version compatibility.", "If you see 'undeclared identifier' errors, your ZeroMQ is likely too old.", ('This pyzmq requires zeromq >= %s' % sv)])
  warn(msg)
 except IndexError:
  msg = '\n'.join(["Couldn't find ZMQ_VERSION macros in zmq.h to check for version compatibility.", 'This probably means that you have ZeroMQ <= 2.0.9', "If you see 'undeclared identifier' errors, your ZeroMQ is likely too old.", ('This pyzmq requires zeromq >= %s' % sv)])
  warn(msg)
 except Exception:
  traceback.print_exc()
  msg = '\n'.join(['Unexpected Error checking for zmq version.', "If you see 'undeclared identifier' errors, your ZeroMQ is likely too old.", ('This pyzmq requires zeromq >= %s' % sv)])
  warn(msg)

def check_zmq_version ( min_version ) : sv = ver_str ( min_version ) try : ( found , zmq_h ) = find_zmq_version ( ) sf = ver_str ( found ) if ( found < min_version ) : print ( 'This pyzmq requires zeromq >= %s' % sv ) print ( 'but it appears you are building against %s' % zmq_h ) print ( 'which has zeromq %s' % sf ) sys . exit ( 1 ) except IOError : msg = '\n' . join ( [ "Couldn't find zmq.h to check for version compatibility." , "If you see 'undeclared identifier' errors, your ZeroMQ is likely too old." , ( 'This pyzmq requires zeromq >= %s' % sv ) ] ) warn ( msg ) except IndexError : msg = '\n' . join ( [ "Couldn't find ZMQ_VERSION macros in zmq.h to check for version compatibility." , 'This probably means that you have ZeroMQ <= 2.0.9' , "If you see 'undeclared identifier' errors, your ZeroMQ is likely too old." , ( 'This pyzmq requires zeromq >= %s' % sv ) ] ) warn ( msg ) except Exception : traceback . print_exc ( ) msg = '\n' . join ( [ 'Unexpected Error checking for zmq version.' , "If you see 'undeclared identifier' errors, your ZeroMQ is likely too old." , ( 'This pyzmq requires zeromq >= %s' % sv ) ] ) warn ( msg )
check that zmq .