Attachment 'root.py'

Download

   1 ##################################################
   2 #
   3 # ROOT module
   4 #
   5 # Author: Jan Engels, DESY
   6 # Date: Jan, 2007
   7 #
   8 ##################################################
   9                                                                                                                                                             
  10 # custom imports
  11 from baseilc import BaseILC
  12 from util import *
  13 
  14 
  15 class ROOT(BaseILC):
  16     """ Responsible for the ROOT configuration process. """
  17     
  18     def __init__(self, userInput):
  19         BaseILC.__init__(self, userInput, "ROOT", "root")
  20 
  21         #self.installSupport = False
  22         self.hasCMakeBuildSupport = False
  23 
  24         self.download.supportedTypes = ["git"]
  25 #[ "wget", "svn-export", "svn" ]
  26 
  27         self.reqfiles = [
  28                 ["lib/libCore.so", "lib64/libCore.so", "lib/libCore.dylib"], 
  29                 ["lib/libPhysics.so", "lib64/libPhysics.so", "lib/libPhysics.dylib"],
  30                 ["bin/root-config"]
  31         ]
  32 
  33         self.reqmodules_external = [ "GSL" ]
  34 
  35     def setMode(self, mode):
  36         BaseILC.setMode(self, mode)
  37 
  38         self.download.url = 'ftp://root.cern.ch/root/root_v%s.source.tar.gz' % self.version
  39         self.download.svnurl = 'http://root.cern.ch/git/root.git'
  40 #'http://root.cern.ch/svn/root'
  41 
  42        #if( Version( self.version ) == 'HEAD' ):
  43        #     self.download.svnurl += '/trunk'
  44         #else:
  45         #    self.download.svnurl += '/tags/v' + self.version.replace('.','-')
  46 
  47     def init(self):
  48         BaseILC.init(self)
  49 
  50         if( Version( self.version ) == 'HEAD' and self.download.type[:3] != 'svn' ):
  51             self.download.type="svn-export"
  52 
  53 
  54     def downloadSources(self):
  55         BaseILC.downloadSources(self)
  56 
  57         # move sources to a subdirectory
  58         os.renames( self.version, self.name )
  59         os.renames( self.name, self.version + "/" + self.name )
  60 
  61     def cleanupInstall(self):
  62         BaseILC.cleanupInstall(self)
  63         os.chdir( self.installPath )
  64         os.system( "rm -rf ./" + self.name )
  65 
  66     def compile(self):
  67         """ compile root """
  68 
  69         os.chdir( self.installPath + "/"  )
  70 
  71         #if( self.rebuild ):
  72         #    os.system( "make clean" )
  73 
  74         gsl=self.parent.module("GSL")
  75         gsl_libdir = gsl.installPath + "/lib"
  76         gsl_incdir = gsl.installPath + "/include"
  77 
  78         os.environ["LD_RUN_PATH"] = gsl_libdir
  79 
  80         qt=self.parent.module("QT")
  81         qt_libdir = qt.installPath + "/lib"
  82         qt_incdir = qt.installPath + "/include"
  83         print "qt_libdir= %s" %qt_libdir
  84         print "qt_incdir= %s" %qt_incdir
  85 
  86 #        if( os.system( "./configure --fail-on-missing --enable-builtin-pcre --enable-explicitlink --enable-soversion --enable-roofit --enable-minuit2 --enable-gdml --enable-table --enable-unuran --enable-xrootd --enable-gsl-shared --with-gsl-incdir="+ gsl_incdir +" --with-gsl-libdir="+ gsl_libdir ) != 0 ):
  87 #        if( os.system( "./configure --fail-on-missing --enable-builtin-pcre --enable-explicitlink --enable-soversion --enable-roofit --enable-minuit2 --enable-gdml --enable-table --enable-unuran --enable-gsl-shared --with-gsl-incdir="+ gsl_incdir +" --with-gsl-libdir="+ gsl_libdir + " --enable-python --with-python-libdir=/usr/lib") != 0 ):
  88 
  89        # if( os.system( "./configure --fail-on-missing --enable-builtin-pcre --enable-builtin-freetype --enable-explicitlink --enable-soversion  --enable-roofit --enable-minuit2 --enable-gdml --enable-table --enable-unuran --enable-gsl-shared  --enable-python --disable-rpath --with-gsl-incdir="+ gsl_incdir + " --with-gsl-libdir="+ gsl_libdir + " --enable-qt --with-qt-incdir=" + qt_incdir + " --with-qt-libdir="+ qt_libdir + " ") != 0 ):
  90 
  91         if( os.system( "./configure --fail-on-missing --enable-builtin-pcre --enable-builtin-freetype --enable-explicitlink --enable-soversion  --enable-roofit --enable-minuit2 --enable-gdml --enable-table --enable-unuran --enable-gsl-shared  --enable-python --disable-rpath --with-gsl-incdir="+ gsl_incdir + " --with-gsl-libdir="+ gsl_libdir + " --enable-qt ") != 0 ):
  92 
  93 
  94       #  if( os.system( "./configure --fail-on-missing --enable-builtin-pcre --enable-explicitlink --enable-soversion --enable-roofit --enable-minuit2 --enable-gdml --enable-table --enable-unuran --enable-gsl-shared --with-gsl-incdir="+ gsl_incdir +" --with-gsl-libdir="+ gsl_libdir + " --enable-python") != 0 ):
  95             self.abort( "failed to configure!!" )
  96 
  97         if( os.system( "make 2>&1 | tee -a " + self.logfile ) != 0 ):
  98             self.abort( "failed to compile!!" )
  99 
 100         if( os.system( "make install 2>&1 | tee -a " + self.logfile ) != 0 ):
 101             self.abort( "failed to install!!" )
 102 
 103 
 104     def postCheckDeps(self):
 105         BaseILC.postCheckDeps(self)
 106 
 107         self.env["ROOTSYS"] = self.installPath
 108         self.envpath["PATH"].append( "$ROOTSYS/bin" )
 109         self.envpath["LD_LIBRARY_PATH"].append( "$ROOTSYS/lib" )
 110         self.envpath["PYTHONPATH"].append( "$ROOTSYS/lib" )

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2016-05-24 19:42:30, 3.1 KB) [[attachment:FindLCIO.cmake]]
  • [get | view] (2016-04-26 15:50:01, 1.7 KB) [[attachment:install_boost.sh]]
  • [get | view] (2016-05-24 16:44:14, 1.7 KB) [[attachment:installboost.sh]]
  • [get | view] (2016-05-24 16:45:49, 1.6 KB) [[attachment:mysql.py]]
  • [get | view] (2016-04-26 15:58:23, 4.4 KB) [[attachment:qt.py]]
  • [get | view] (2016-04-26 15:50:14, 12.2 KB) [[attachment:release-ilcsoft.cfg]]
  • [get | view] (2016-04-26 15:50:18, 5.7 KB) [[attachment:release-versions.py]]
  • [get | view] (2016-04-26 15:58:02, 4.8 KB) [[attachment:root.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.