예제 #1
0
 def _Install(self):
     """ Derived classes should override this to install the package, should install only when finished. Return True on success."""
     import shutil
     sys = os.uname()[0] + "-g++"
     self._InstallPipe += PackageUtil.UnTarFile(self._SourceTar,
                                                self.GetInstallPath(), 1)
     for dataTar in self._DataTars:
         self._InstallPipe += PackageUtil.UnTarFile(
             dataTar, os.path.join(self.GetInstallPath(), "data"), 0)
     self.WriteGeant4ConfigFile()
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         './Configure', [
             '-incflags', '-build', '-d', '-e', '-f',
             "geant4-snoing-config.sh"
         ], None, self.GetInstallPath())
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         './Configure', [
             '-incflags', '-install', '-d', '-e', '-f',
             "geant4-snoing-config.sh"
         ], None, self.GetInstallPath())
     try:
         self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
             './Configure', [], None, self.GetInstallPath())
     except Exception:  # Geant4 configure always fails, it is annoying
         pass
     if not os.path.exists(os.path.join(self.GetInstallPath(), 'env.sh')):
         shutil.copy(
             os.path.join(self.GetInstallPath(),
                          '.config/bin/' + sys + '/env.sh'),
             os.path.join(self.GetInstallPath(), 'env.sh'))
         shutil.copy(
             os.path.join(self.GetInstallPath(),
                          '.config/bin/' + sys + '/env.csh'),
             os.path.join(self.GetInstallPath(), 'env.csh'))
     return
예제 #2
0
 def _Install(self):
     """ Release installs must untar first."""
     self._InstallPipe += PackageUtil.UnTarFile(
         self._TarName, self.GetInstallPath(),
         1)  # Strip the first directory
     super(RatRelease, self)._Install()
     return
예제 #3
0
파일: Clhep.py 프로젝트: mschwen/snoing
 def _Install( self ):
     """ Install clhep."""
     self._InstallPipe += PackageUtil.UnTarFile( self._TarName, self.GetInstallPath(), 2 )
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand( './configure', ['--prefix=%s' % self.GetInstallPath() ], 
                                                            None, self.GetInstallPath() )
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand( 'make', [], None, self.GetInstallPath() )
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand( 'make', ["install"], None, self.GetInstallPath() )
     return 
예제 #4
0
 def _Install( self ):
     """ Derived classes should override this to install the package, should install only when finished."""
     env = os.environ
     sourcePath = os.path.join( PackageUtil.kInstallPath, "%s-source" % self._Name )
     self._InstallPipe += PackageUtil.UnTarFile( self._TarName, sourcePath, 1 )
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand( "./configure", [ "--prefix=%s" %( self.GetInstallPath() ) ], env, sourcePath )
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand( "make", [], env, sourcePath )
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand( "make", [ "install" ], env, sourcePath )
     return
예제 #5
0
 def _Install(self):
     """ Install bzip2."""
     PackageUtil.UnTarFile(self._TarName, self.GetInstallPath(), 1)
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         "make", ["-f", "Makefile-libbz2_so"], None, self.GetInstallPath())
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         "make", ["install", "PREFIX=" + self.GetInstallPath()], None,
         self.GetInstallPath())
     return
예제 #6
0
파일: Sfml.py 프로젝트: jwaterfield/snoing
 def _Install( self ):
     """ Install sfml."""
     env = os.environ
     installPath = self.GetInstallPath()
     PackageUtil.UnTarFile( self._TarName, self.GetInstallPath(), 1 )
     cmakeCommand = "cmake"
     if self._DependencyPaths["cmake"] is not None: # Special cmake installed
         cmakeCommand = "%s/bin/cmake" % self._DependencyPaths["cmake"]
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand( cmakeCommand, [ "-DCMAKE_INSTALL_PREFIX:PATH=$PWD" ], env, self.GetInstallPath() )
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand( "make", [], env, self.GetInstallPath() )
     return
예제 #7
0
파일: Cmake.py 프로젝트: mschwen/snoing
 def _Install(self):
     """ Install the 2.8 version."""
     self._InstallPipe += PackageUtil.UnTarFile("cmake-2.8.8.tar.gz",
                                                self.GetInstallPath(), 1)
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         "./bootstrap", ["--prefix=%s" % self.GetInstallPath()], None,
         self.GetInstallPath())
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         "make", [], None, self.GetInstallPath())
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         "make", ["install"], None, self.GetInstallPath())
     return
예제 #8
0
 def _Install(self):
     """ Install the 3.1.1 version."""
     sourcePath = os.path.join(PackageUtil.kInstallPath,
                               "%s-source" % self._Name)
     self._InstallPipe += PackageUtil.UnTarFile(self._TarName, sourcePath,
                                                1)
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         "./configure", [], None, sourcePath)
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         "make", [], None, sourcePath)
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         "make", ["install", "prefix=%s" % self.GetInstallPath()], None,
         sourcePath)
     return
예제 #9
0
파일: Clhep.py 프로젝트: mschwen/snoing
 def _Install( self ):
     """ Install clhep, using cmake."""
     sourcePath = os.path.join( PackageUtil.kInstallPath, "%s-source" % self._Name )
     PackageUtil.UnTarFile( self._SourceTar, sourcePath, 2 )
     if not os.path.exists( self.GetInstallPath() ):
         os.makedirs( self.GetInstallPath() )
     cmakeOpts = [ "-DCMAKE_INSTALL_PREFIX=%s" % self.GetInstallPath() ]
     cmakeOpts.extend( [ sourcePath ] )
     cmakeCommand = "cmake"
     if self._DependencyPaths["cmake"] is not None: # Special cmake installed
         cmakeCommand = "%s/bin/cmake" % self._DependencyPaths["cmake"]
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand( cmakeCommand, cmakeOpts, None, self.GetInstallPath() )
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand( "make", [], None, self.GetInstallPath() )
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand( "make", ['install'], None, self.GetInstallPath() )
     return
예제 #10
0
 def _Install(self):
     """ Derived classes should override this to install the package, should install only when finished. Return True on success."""
     self._InstallPipe += PackageUtil.UnTarFile(self._TarName,
                                                self.GetInstallPath(), 1)
     sys = os.uname()[0]
     if PackageUtil.kGrid:
         self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
             './configure', [
                 '--enable-minuit2', '--enable-roofit', '--enable-python',
                 '--disable-castor', '--disable-rfio', '--disable-x11'
             ] + PackageUtil.arguments, None, self.GetInstallPath())
     else:
         self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
             './configure',
             ['--enable-minuit2', '--enable-roofit', '--enable-python'] +
             PackageUtil.arguments, None, self.GetInstallPath())
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         'make', [], None, self.GetInstallPath())
     return
예제 #11
0
 def _Install(self):
     """ Install geant4, using cmake."""
     sourcePath = os.path.join(PackageUtil.kInstallPath,
                               "%s-source" % self._Name)
     PackageUtil.UnTarFile(self._SourceTar, sourcePath, 1)
     self._patch_timeout()
     if not os.path.exists(self.GetInstallPath()):
         os.makedirs(self.GetInstallPath())
     cmakeOpts = [ "-DCMAKE_INSTALL_PREFIX=%s" % self.GetInstallPath(), \
                       "-DCLHEP_ROOT_DIR=%s" % self._DependencyPaths[self._ClhepDependency], \
                       "-DXERCESC_ROOT_DIR=%s" % self._DependencyPaths[self._XercesDependency], \
                       "-DGEANT4_INSTALL_DATA=ON", \
                       "-DCLHEP_CONFIG_EXECUTABLE=%s" % os.path.join( self._DependencyPaths[self._ClhepDependency], "bin/clhep-config" ) ]
     env = None
     if PackageUtil.kGraphical:
         cmakeOpts.extend([
             "-DGEANT4_USE_XM=ON", "-DGEANT4_USE_OPENGL_X11=ON",
             "-DGEANT4_USE_RAYTRACER_X11=ON"
         ])
         env = {
             'G4VIS_BUILD_VRML_DRIVER': "1",
             'G4VIS_BUILD_OPENGLX_DRIVER': "1",
             'G4VIS_BUILD_OPENGLXM_DRIVER': "1",
             'G4VIS_BUILD_DAWN_DRIVER': "1"
         }
     cmakeOpts.extend([sourcePath])
     cmakeCommand = "cmake"
     if self._DependencyPaths[
             "cmake"] is not None:  # Special cmake installed
         cmakeCommand = "%s/bin/cmake" % self._DependencyPaths["cmake"]
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         cmakeCommand, cmakeOpts, env, self.GetInstallPath())
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         "make", [], env, self.GetInstallPath())
     self._InstallPipe += PackageUtil.ExecuteSimpleCommand(
         "make", ['install'], env, self.GetInstallPath())
     return
예제 #12
0
파일: Avalanche.py 프로젝트: mschwen/snoing
 def _Install( self ):
     """ Untar then call base installer."""
     PackageUtil.UnTarFile( self._TarName, self.GetInstallPath(), 1 )
     super( AvalancheRelease, self )._Install()
예제 #13
0
 def _Install(self):
     """ Untar the file first."""
     self._InstallPipe += PackageUtil.UnTarFile(self._TarName,
                                                self.GetInstallPath(), 1)
     super(SnogogglesRelease, self)._Install()
     return