forked from iLCSoft/iLCInstall
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pandoranew.py
90 lines (60 loc) · 3.11 KB
/
pandoranew.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
84
85
86
87
88
89
90
##################################################
#
# PandoraPFANew module
#
# Author: F.Gaede, J.Engels, DESY
# Date: June 8 2010
#
##################################################
from .util import *
# custom imports
from .marlinpkg import MarlinPKG
from .baseilc import BaseILC
class PandoraPFANew(BaseILC):
""" Responsible for the PandoraPFANew installation process. """
def __init__(self, userInput):
BaseILC.__init__(self, userInput, "PandoraPFANew","PandoraPFANew" )
self.download.supportedTypes = ["git"]
self.download.svnurl = 'https://github.com/PandoraPFA/PandoraPFA.git'
self.hasCMakeFindSupport = True
self.optmodules = [ "ROOT" ]
self.reqfiles = [ [
'lib/libPandoraSDK.so', 'lib/libPandoraSDK.a', 'lib/libPandoraSDK.dylib',
'lib/libPandoraMonitoring.so', 'lib/libPandoraMonitoring.a', 'lib/libPandoraMonitoring.dylib',
'lib/libLCContent.so', 'lib/libLCContent.a', 'lib/libLCContent.dylib',
] ]
def compile(self):
""" compile PandoraPFANew"""
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( ". ../build_env.sh ; make ${MAKEOPTS} 2>&1 | tee -a " + self.logfile ) != 0 ):
self.abort( "failed to compile!!" )
if( os_system( ". ../build_env.sh ; make install 2>&1 | tee -a " + self.logfile ) != 0 ):
self.abort( "failed to install!!" )
def postCheckDeps(self):
self.env["PANDORAPFANEW"] = self.installPath
self.envpath["LD_LIBRARY_PATH"].append( "$PANDORAPFANEW/lib" )
class MarlinPandora(MarlinPKG):
""" Responsible for the MarlinPandora installation process. """
def __init__(self, userInput):
MarlinPKG.__init__(self, "MarlinPandora", userInput )
self.download.supportedTypes = ["git"]
self.download.svnurl = 'https://github.com/PandoraPFA/MarlinPandora.git'
# required modules
self.reqmodules = [ "Marlin", "MarlinUtil", "GEAR", "PandoraPFANew", "LCIO" ]
class PandoraAnalysis(MarlinPKG):
""" Responsible for the PandoraAnalysis installation process. """
def __init__(self, userInput):
MarlinPKG.__init__(self, "PandoraAnalysis", userInput )
self.download.supportedTypes = ["git"]
self.download.svnurl = 'https://github.com/PandoraPFA/LCPandoraAnalysis.git'
# required modules
self.reqmodules = [ "Marlin", "GEAR", "LCIO", "ROOT" , "MarlinUtil" ]
def postCheckDeps(self):
MarlinPKG.postCheckDeps(self)
self.env["PANDORA_ANALYSIS_DIR"] = self.installPath
self.envpath["LD_LIBRARY_PATH"].append( "$PANDORA_ANALYSIS_DIR/lib" )
self.envpath["PATH"].append( "$PANDORA_ANALYSIS_DIR/bin" )