def run(self): self.create_tempdir() settings = copy.copy(COMPILER_SETTINGS) if doing_bdist and not sys.platform.startswith('win'): # rpath slightly differently here, because libzmq not in .. but ../zmq: settings['library_dirs'] = ['zmq'] if sys.platform == 'darwin': pass # unused rpath args for OSX: # settings['extra_link_args'] = ['-Wl,-rpath','-Wl,$ORIGIN/../zmq'] else: settings['runtime_library_dirs'] = ['$ORIGIN/../zmq'] try: print ("*"*42) print ("Configure: Autodetecting ZMQ settings...") print (" Custom ZMQ dir: %s" % (ZMQ,)) config = detect_zmq(self.tempdir, **settings) except Exception: fatal(""" Failed to compile ZMQ test program. Please check to make sure: * You have a C compiler installed * A development version of Python is installed (including header files) * A development version of ZeroMQ >= 2.1.0 is installed (including header files) * If ZMQ is not in a default location, supply the argument --zmq=<path>""") else: savepickle('configure.pickle', config) print (" ZMQ version detected: %s" % v_str(config['vers'])) finally: print ("*"*42) self.erase_tempdir() self.config = config
def run(self): self.create_tempdir() settings = copy.copy(COMPILER_SETTINGS) if doing_bdist and not sys.platform.startswith('win'): # rpath slightly differently here, because libzmq not in .. but ../zmq: settings['library_dirs'] = ['zmq'] if sys.platform == 'darwin': pass # unused rpath args for OSX: # settings['extra_link_args'] = ['-Wl,-rpath','-Wl,$ORIGIN/../zmq'] else: settings['runtime_library_dirs'] = ['$ORIGIN/../zmq'] try: print("*" * 42) print("Configure: Autodetecting ZMQ settings...") print(" Custom ZMQ dir: %s" % (ZMQ, )) config = detect_zmq(self.tempdir, **settings) except Exception: etype, evalue, tb = sys.exc_info() # print the error as distutils would if we let it raise: print("error: %s" % evalue) if etype is CompileError: action = 'compile' elif etype is LinkError: action = 'link' else: action = 'build or run' fatal(""" Failed to %s ZMQ test program. Please check to make sure: * You have a C compiler installed * A development version of Python is installed (including header files) * A development version of ZMQ >= %s is installed (including header files) * If ZMQ is not in a default location, supply the argument --zmq=<path> * If you did recently install ZMQ to a default location, try rebuilding the ld cache with `sudo ldconfig` or specify zmq's location with `--zmq=/usr/local` """ % (action, v_str(min_zmq))) else: savepickle('configure.pickle', config) print(" ZMQ version detected: %s" % v_str(config['vers'])) finally: print("*" * 42) self.erase_tempdir() self.config = config
def run(self): self.create_tempdir() settings = copy.copy(COMPILER_SETTINGS) if doing_bdist and not sys.platform.startswith('win'): # rpath slightly differently here, because libzmq not in .. but ../zmq: settings['library_dirs'] = ['zmq'] if sys.platform == 'darwin': pass # unused rpath args for OSX: # settings['extra_link_args'] = ['-Wl,-rpath','-Wl,$ORIGIN/../zmq'] else: settings['runtime_library_dirs'] = ['$ORIGIN/../zmq'] try: print ("*"*42) print ("Configure: Autodetecting ZMQ settings...") print (" Custom ZMQ dir: %s" % (ZMQ,)) config = detect_zmq(self.tempdir, **settings) except Exception: etype = sys.exc_info()[0] if etype is CompileError: action = 'compile' elif etype is LinkError: action = 'link' else: action = 'run' fatal(""" Failed to %s ZMQ test program. Please check to make sure: * You have a C compiler installed * A development version of Python is installed (including header files) * A development version of ZMQ >= %s is installed (including header files) * If ZMQ is not in a default location, supply the argument --zmq=<path> * If you did recently install ZMQ to a default location, try rebuilding the ld cache with `sudo ldconfig` or specify zmq's location with `--zmq=/usr/local` """%(action, v_str(min_zmq))) else: savepickle('configure.pickle', config) print (" ZMQ version detected: %s" % v_str(config['vers'])) finally: print ("*"*42) self.erase_tempdir() self.config = config
def run(self): self.create_tempdir() try: print("*" * 42) print("Configure: Autodetecting ZMQ settings...") print(" Custom ZMQ dir: %s" % (ZMQ, )) config = detect_zmq(self.tempdir, **COMPILER_SETTINGS) except Exception: logging.error(""" Failed to compile ZMQ test program. Please check to make sure: * You have a C compiler installed * A development version of Python is installed (including header files) * A development version of ZeroMQ >= 2.1.0 is installed (including header files) * If ZMQ is not in a default location, supply the argument --zmq=<path>""") raise else: savepickle('configure.pickle', config) print(" ZMQ version detected: %s" % v_str(config['vers'])) finally: print("*" * 42) self.erase_tempdir() self.config = config
def run(self): self.create_tempdir() try: print ("*"*42) print ("Configure: Autodetecting ZMQ settings...") print (" Custom ZMQ dir: %s" % (ZMQ,)) config = detect_zmq(self.tempdir, **COMPILER_SETTINGS) except Exception: logging.error(""" Failed to compile ZMQ test program. Please check to make sure: * You have a C compiler installed * A development version of Python is installed (including header files) * A development version of ZeroMQ >= 2.1.0 is installed (including header files) * If ZMQ is not in a default location, supply the argument --zmq=<path>""") raise else: savepickle('configure.pickle', config) print (" ZMQ version detected: %s" % v_str(config['vers'])) finally: print ("*"*42) self.erase_tempdir() self.config = config
def run(self): self.create_tempdir() settings = self.settings if bundle_libzmq and not sys.platform.startswith('win'): # rpath slightly differently here, because libzmq not in .. but ../zmq: settings['library_dirs'] = ['zmq'] if sys.platform == 'darwin': pass # unused rpath args for OSX: # settings['extra_link_args'] = ['-Wl,-rpath','-Wl,$ORIGIN/../zmq'] else: settings['runtime_library_dirs'] = ['$ORIGIN/../zmq'] try: print ("*"*42) print ("Configure: Autodetecting ZMQ settings...") print (" Custom ZMQ dir: %s" % (self.zmq,)) config = detect_zmq(self.tempdir, **settings) except Exception: # if zmq unspecified on *ix, try again with explicit /usr/local if self.zmq is None and not sys.platform.startswith('win'): self.erase_tempdir() print ("Failed with default libzmq, trying again with /usr/local") self.zmq = '/usr/local' self.settings = settings_from_prefix(self.zmq) self.run() # if we get here the second run succeeded, so we need to update compiler # settings for the extensions with /usr/local prefix for ext in self.distribution.ext_modules: for key,value in self.settings.iteritems(): setattr(ext, key, value) return etype, evalue, tb = sys.exc_info() # print the error as distutils would if we let it raise: print ("error: %s" % evalue) if etype is CompileError: action = 'compile' elif etype is LinkError: action = 'link' else: action = 'build or run' fatal(""" Failed to %s ZMQ test program. Please check to make sure: * You have a C compiler installed * A development version of Python is installed (including header files) * A development version of ZMQ >= %s is installed (including header files) * If ZMQ is not in a default location, supply the argument --zmq=<path> * If you did recently install ZMQ to a default location, try rebuilding the ld cache with `sudo ldconfig` or specify zmq's location with `--zmq=/usr/local` """%(action, v_str(min_zmq))) else: savepickle('configure.pickle', config) print (" ZMQ version detected: %s" % v_str(config['vers'])) finally: print ("*"*42) self.erase_tempdir() self.config = config