예제 #1
0
 def make_install(self, flags):
     """Invoke `make install`.
     
     Args:
         flags (list): Command line flags to pass to `make`.
         
     Raises:
         SoftwarePackageError: Configuration failed.
     """
     assert self._src_prefix
     LOGGER.debug("Installing %s to '%s'", self.name, self.install_prefix)
     cmd = ['make', 'install'] + parallel_make_flags() + flags
     LOGGER.info("Installing %s...", self.title)
     if util.create_subprocess(cmd,
                               cwd=self._src_prefix,
                               stdout=False,
                               show_progress=True):
         cmd = ['make', 'install'] + flags
         if util.create_subprocess(cmd,
                                   cwd=self._src_prefix,
                                   stdout=False,
                                   show_progress=True):
             util.add_error_stack(self._src_prefix)
             raise SoftwarePackageError('%s installation failed' %
                                        self.title)
     # Some systems use lib64 instead of lib
     if os.path.isdir(self.lib_path +
                      '64') and not os.path.isdir(self.lib_path):
         os.symlink(self.lib_path + '64', self.lib_path)
예제 #2
0
 def make(self, flags):
     """Invoke `make`.
     
     Args:
         flags (list): Command line flags to pass to `make`.
         
     Raises:
         SoftwarePackageError: Compilation failed.
     """
     assert self._src_prefix
     LOGGER.debug("Making %s at '%s'", self.name, self._src_prefix)
     cmd = ['make'] + parallel_make_flags() + flags
     LOGGER.info("Compiling %s...", self.title)
     if util.create_subprocess(cmd,
                               cwd=self._src_prefix,
                               stdout=False,
                               show_progress=True):
         cmd = ['make'] + flags
         if util.create_subprocess(cmd,
                                   cwd=self._src_prefix,
                                   stdout=False,
                                   show_progress=True):
             util.add_error_stack(self._src_prefix)
             raise SoftwarePackageError('%s compilation failed' %
                                        self.title)
예제 #3
0
    def cmake(self, flags):
        """Invoke `cmake`.
        
        Args:
            flags (list): Command line flags to pass to `cmake`.
            
        Raises:
            SoftwarePackageError: Configuration failed.
	"""
        assert self._src_prefix
        cmake = self._get_cmake()
        cmd = [cmake, '-DCMAKE_INSTALL_PREFIX=%s' % self.install_prefix] + flags
        LOGGER.info("Executing CMake for %s...", self.title)
        if util.create_subprocess(cmd, cwd=self._src_prefix, stdout=False, show_progress=True):
            util.add_error_stack(self._src_prefix)
            raise SoftwarePackageError('CMake failed for %s' %self.title)
예제 #4
0
 def configure(self, flags):
     """Invoke `configure`.
     
     Args:
         flags (list): Command line flags to pass to `configure`.
         
     Raises:
         SoftwarePackageError: Configuration failed.
     """
     assert self._src_prefix
     LOGGER.debug("Configuring %s at '%s'", self.name, self._src_prefix)
     cmd = ['./configure', '--prefix=%s' % self.install_prefix] + flags
     LOGGER.info("Configuring %s...", self.title)
     if util.create_subprocess(cmd, cwd=self._src_prefix, stdout=False, show_progress=True):
         util.add_error_stack(self._src_prefix)
         raise SoftwarePackageError('%s configure failed' % self.title)   
예제 #5
0
 def make(self, flags):
     """Invoke `make`.
     
     Args:
         flags (list): Command line flags to pass to `make`.
         
     Raises:
         SoftwarePackageError: Compilation failed.
     """
     assert self._src_prefix
     LOGGER.debug("Making %s at '%s'", self.name, self._src_prefix)
     cmd = ['make'] + parallel_make_flags() + flags
     LOGGER.info("Compiling %s...", self.title)
     if util.create_subprocess(cmd, cwd=self._src_prefix, stdout=False, show_progress=True):
         cmd = ['make'] + flags
         if util.create_subprocess(cmd, cwd=self._src_prefix, stdout=False, show_progress=True):
             util.add_error_stack(self._src_prefix)
             raise SoftwarePackageError('%s compilation failed' % self.title)
예제 #6
0
 def configure(self, flags):
     """Invoke `configure`.
     
     Args:
         flags (list): Command line flags to pass to `configure`.
         
     Raises:
         SoftwarePackageError: Configuration failed.
     """
     assert self._src_prefix
     LOGGER.debug("Configuring %s at '%s'", self.name, self._src_prefix)
     cmd = ['./configure', '--prefix=%s' % self.install_prefix] + flags
     LOGGER.info("Configuring %s...", self.title)
     if util.create_subprocess(cmd,
                               cwd=self._src_prefix,
                               stdout=False,
                               show_progress=True):
         util.add_error_stack(self._src_prefix)
         raise SoftwarePackageError('%s configure failed' % self.title)
예제 #7
0
    def cmake(self, flags):
        """Invoke `cmake`.
        
        Args:
            flags (list): Command line flags to pass to `cmake`.
            
        Raises:
            SoftwarePackageError: Configuration failed.
	"""
        assert self._src_prefix
        cmake = self._get_cmake()
        cmd = [cmake, '-DCMAKE_INSTALL_PREFIX=%s' % self.install_prefix
               ] + flags
        LOGGER.info("Executing CMake for %s...", self.title)
        if util.create_subprocess(cmd,
                                  cwd=self._src_prefix,
                                  stdout=False,
                                  show_progress=True):
            util.add_error_stack(self._src_prefix)
            raise SoftwarePackageError('CMake failed for %s' % self.title)
예제 #8
0
 def make_install(self, flags):
     """Invoke `make install`.
     
     Args:
         flags (list): Command line flags to pass to `make`.
         
     Raises:
         SoftwarePackageError: Configuration failed.
     """
     assert self._src_prefix
     LOGGER.debug("Installing %s to '%s'", self.name, self.install_prefix)
     cmd = ['make', 'install'] + parallel_make_flags() + flags
     LOGGER.info("Installing %s...", self.title)
     if util.create_subprocess(cmd, cwd=self._src_prefix, stdout=False, show_progress=True):
         cmd = ['make', 'install'] + flags
         if util.create_subprocess(cmd, cwd=self._src_prefix, stdout=False, show_progress=True):
             util.add_error_stack(self._src_prefix)
             raise SoftwarePackageError('%s installation failed' % self.title)
     # Some systems use lib64 instead of lib
     if os.path.isdir(self.lib_path+'64') and not os.path.isdir(self.lib_path):
         os.symlink(self.lib_path+'64', self.lib_path)