def test_build(self, prefix, settings):
     """do a test build ob libzmq"""
     self.create_tempdir()
     settings = settings.copy()
     if self.bundle_libzmq_dylib 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 OS X:
             # settings['extra_link_args'] = ['-Wl,-rpath','-Wl,$ORIGIN/../zmq']
         else:
             settings['runtime_library_dirs'] = [ os.path.abspath(pjoin('.', 'zmq')) ]
     
     line()
     info("Configure: Autodetecting ZMQ settings...")
     info("    Custom ZMQ dir:       %s" % prefix)
     try:
         detected = detect_zmq(self.tempdir, compiler=self.compiler_type, **settings)
     finally:
         self.erase_tempdir()
     
     info("    ZMQ version detected: %s" % v_str(detected['vers']))
     
     return detected
Esempio n. 2
0
    def test_build(self, prefix, settings):
        """do a test build ob libzmq"""
        self.create_tempdir()
        settings = settings.copy()
        if self.bundle_libzmq_dylib 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 OS X:
                # settings['extra_link_args'] = ['-Wl,-rpath','-Wl,$ORIGIN/../zmq']
            else:
                settings['runtime_library_dirs'] = [
                    os.path.abspath(pjoin('.', 'zmq'))
                ]
        line()
        info("Configure: Autodetecting ZMQ settings...")
        info("    Custom ZMQ dir:       %s" % prefix)
        try:
            detected = detect_zmq(self.tempdir,
                                  compiler=self.compiler_type,
                                  **settings)
        finally:
            self.erase_tempdir()

        info("    ZMQ version detected: %s" % v_str(detected['vers']))

        return detected
Esempio n. 3
0
File: setup.py Progetto: mlsna/pyzmq
    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
Esempio n. 4
0
    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
Esempio n. 5
0
    def test_build(self, prefix, settings):
        """do a test build ob libzmq"""
        self.create_tempdir()
        settings = settings.copy()
        line()
        info("Configure: Autodetecting ZMQ settings...")
        info("    Custom ZMQ dir:       %s" % prefix)
        try:
            detected = detect_zmq(self.tempdir,
                                  compiler=self.compiler_type,
                                  **settings)
        finally:
            self.erase_tempdir()

        info("    ZMQ version detected: %s" % v_str(detected['vers']))

        return detected
Esempio n. 6
0
    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
Esempio n. 7
0
    def test_build(self, prefix, settings):
        """do a test build ob libzmq"""
        self.create_tempdir()
        settings = settings.copy()
        if self.bundle_libzmq_dylib and not sys.platform.startswith('win'):
            # rpath slightly differently here, because libzmq not in .. but ../zmq:
            settings['library_dirs'] = ['zmq']
            _add_rpath(settings, os.path.abspath(pjoin('.', 'zmq')))
        line()
        info("Configure: Autodetecting ZMQ settings...")
        info("    Custom ZMQ dir:       %s" % prefix)
        try:
            detected = detect_zmq(self.tempdir, compiler=self.compiler_type, **settings)
        finally:
            self.erase_tempdir()

        info("    ZMQ version detected: %s" % v_str(detected['vers']))

        return detected
Esempio n. 8
0
File: setup.py Progetto: dln/pyzmq
 def test_build(self, prefix, settings):
     """do a test build ob libzmq"""
     self.create_tempdir()
     settings = settings.copy()
     if self.bundle_libzmq_dylib and not sys.platform.startswith('win'):
         # rpath slightly differently here, because libzmq not in .. but ../zmq:
         settings['library_dirs'] = ['zmq']
         _add_rpath(settings, os.path.abspath(pjoin('.', 'zmq')))
     line()
     info("Configure: Autodetecting ZMQ settings...")
     info("    Custom ZMQ dir:       %s" % prefix)
     try:
         detected = detect_zmq(self.tempdir, compiler=self.compiler_type, **settings)
     finally:
         self.erase_tempdir()
     
     info("    ZMQ version detected: %s" % v_str(detected['vers']))
     
     return detected
Esempio n. 9
0
 def test_build(self, zmq, settings):
     self.create_tempdir()
     if bundle_libzmq_dylib 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']
     
     line()
     print ("Configure: Autodetecting ZMQ settings...")
     print ("    Custom ZMQ dir:       %s" % zmq)
     try:
         config = detect_zmq(self.tempdir, **settings)
     finally:
         self.erase_tempdir()
     
     print ("    ZMQ version detected: %s" % v_str(config['vers']))
     
     return config
Esempio n. 10
0
 def test_build(self, zmq, settings):
     self.create_tempdir()
     if bundle_libzmq_dylib 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']
     
     line()
     print ("Configure: Autodetecting ZMQ settings...")
     print ("    Custom ZMQ dir:       %s" % zmq)
     try:
         config = detect_zmq(self.tempdir, compiler=self.compiler_type, **settings)
     finally:
         self.erase_tempdir()
     
     print ("    ZMQ version detected: %s" % v_str(config['vers']))
     
     return config
Esempio n. 11
0
    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
Esempio n. 12
0
    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
Esempio n. 13
0
File: setup.py Progetto: aelse/pyzmq
    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