forked from iLCSoft/iLCInstall
-
Notifications
You must be signed in to change notification settings - Fork 1
/
slicpandora.py
83 lines (58 loc) · 2.79 KB
/
slicpandora.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
##################################################
#
# SLIC module
#
# Author: F.Gaede, DESY
# Date: April 2013
#
##################################################
# custom imports
from .baseilc import BaseILC
from .util import *
class SlicPandora(BaseILC):
""" Responsible for the slicPandora software installation process. """
def __init__(self, userInput):
BaseILC.__init__(self, userInput, "SlicPandora", "slicPandora")
self.reqfiles = [ ["build/lib/libslicPandora.so", "build/lib/libslicPandora.dylib", "build/bin/PandoraFrontend" ] ]
# set some cvs variables
#self.download.env["CVSROOT"]=":pserver:[email protected]:/cvs/lcd"
#self.download.supportedTypes = ["cvs"]
#self.download.accessmode = "pserver"
#self.download.server = "cvs.freehep.org"
#self.download.root = "cvs/lcd"
#self.download.project = "slicPandora"
self.download.supportedTypes = [ "svn" ]
self.reqmodules = [ "LCIO", "PandoraPFANew" ]
def setMode(self, mode):
BaseILC.setMode(self, mode)
self.download.svnurl = 'svn://svn.freehep.org/lcdet/projects/slicPandora'
if( Version( self.version ) == 'HEAD' ):
self.download.svnurl += '/trunk'
elif '-pre' in self.version or '-dev' in self.version:
self.download.svnurl += '/branches/' + self.version
else:
self.download.svnurl += '/tags/' + self.version
print("slicPandora SVN URL: ", self.download.svnurl)
def compile(self):
""" compile slicPandora """
os.chdir( self.installPath+'/build' )
if self.rebuild:
tryunlink( "CMakeCache.txt" )
if( os.system( 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!!" )
# execute ctests
if( self.makeTests ):
if( os.system( "make tests && make test" ) != 0 ):
self.abort( "failed to execute slic tests" )
def preCheckDeps(self):
BaseILC.preCheckDeps(self)
def postCheckDeps(self):
BaseILC.postCheckDeps(self)
self.env["SLICPANDORA"] = self.installPath
# PATH
self.envpath["PATH"].append( "$SLICPANDORA/build/bin" )
self.envpath["LD_LIBRARY_PATH"].append( "$SLICPANDORA/build/lib" )