forked from iLCSoft/iLCInstall
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gbl.py
54 lines (37 loc) · 1.59 KB
/
gbl.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
##################################################
#
# GBL module for general broken lines
#
# Author: Ch. Rosemann, DESY -- based on work by Jan Engels
# Date: Mar, 2013
#
##################################################
# custom imports
from .baseilc import BaseILC
from .util import *
class GBL(BaseILC):
""" Responsible for the GBL software installation process. """
def __init__(self, userInput):
BaseILC.__init__(self, userInput, "GBL", "GBL")
self.reqfiles = [ ["lib/libGBL.so","lib/libGBL.a","lib/libGBL.dylib"] ]
self.reqmodules = [ "ROOT" , "Eigen" ]
self.download.supportedTypes = [ "GitHub" ]
self.download.gituser = 'GeneralBrokenLines'
self.download.gitrepo = 'GeneralBrokenLines'
def compile(self):
""" compile GBL """
os.chdir( self.installPath+'/build' )
if( self.rebuild ):
tryunlink( "CMakeCache.txt" )
if( os_system( ". ../build_env.sh ; " + self.genCMakeCmd() + " 2>&1 | tee -a " + self.logfile ) != 0 ):
self.abort( "failed to configure!!" )
if( os_system( "make ${MAKEOPTS} 2>&1 | tee -a " + self.logfile ) != 0 ):
self.abort( "failed to compile!!" )
if( os_system( "make install 2>&1 | tee -a " + self.logfile ) != 0 ):
self.abort( "failed to install!!" )
def postCheckDeps(self):
BaseILC.postCheckDeps(self)
self.env["GBL"] = self.installPath
self.envpath["LD_LIBRARY_PATH"].append( '$GBL/lib' )
def setMode(self, mode):
BaseILC.setMode(self, mode)