def _Install(self): """ Install Avaons.""" envFile = EnvFileBuilder.EnvFileBuilder() envFile.AppendPath( os.path.join(self._DependencyPaths[self._CurlDependency], "bin")) envFile.AppendPath( os.path.join(self._DependencyPaths[self._SconsDependency], "script")) envFile.AppendPythonPath( os.path.join(self._DependencyPaths[self._SconsDependency], "engine")) envFile.AddEnvironment("ROOTSYS", self._DependencyPaths[self._RootDependency]) envFile.AddEnvironment("RATROOT", self._DependencyPaths[self._RatDependency]) envFile.AddEnvironment("G4SYSTEM", os.uname()[0] + "-g++") # Temp if self._DependencyPaths[self._BZipDependency] is not None: envFile.AddEnvironment("BZIPROOT", self._DependencyPaths[self._BZipDependency]) envFile.AddEnvironment( "AVALANCHEROOT", self._DependencyPaths[self._AvalancheDependency]) envFile.AddEnvironment("ZEROMQROOT", self._DependencyPaths[self._ZeromqDependency]) envFile.WriteEnvFiles(self.GetInstallPath(), "env") commandText = """#!/bin/bash\ncd %s\nsource env.sh\nscons\n""" % self.GetInstallPath( ) self._InstallPipe += PackageUtil.ExecuteComplexCommand(commandText) return
def _Install(self): """ Install Snogoggles.""" self.WriteEnvFile() self._InstallPipe += PackageUtil.ExecuteComplexCommand( "source env_%s.sh\ncd %s\nscons" % (self._Name, self.GetInstallPath())) return
def _Update( self ): """ Special updater for rat-dev, delete env file write a new then git pull and scons.""" os.remove( os.path.join( PackageUtil.kInstallPath, "env_%s.sh" % self._Name ) ) os.remove( os.path.join( PackageUtil.kInstallPath, "env_%s.csh" % self._Name ) ) self.WriteEnvFile() commandText = """#!/bin/bash\nsource %s\ncd %s\ngit pull\nscons -c\nscons""" % ( os.path.join( PackageUtil.kInstallPath, "env_%s.sh" % self._Name ), self.GetInstallPath() ) self._InstallPipe += PackageUtil.ExecuteComplexCommand( commandText, True ) return
def _Install(self): """ Derived classes should override this to install the package, should install only when finished. Return True on success.""" self.WriteEnvFile() # Write the command file and source it... commandText = """#!/bin/bash\nsource %s\ncd %s\n./configure\nsource env.sh\nscons""" % ( os.path.join(PackageUtil.kInstallPath, "env_%s.sh" % self._Name), self.GetInstallPath()) self._InstallPipe += PackageUtil.ExecuteComplexCommand(commandText) return