forked from iLCSoft/iLCInstall
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsimtoolsmaker.py
99 lines (75 loc) · 3.69 KB
/
simtoolsmaker.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
91
92
93
94
95
96
97
98
##################################################
#
# SimTools module
#
# THIS MODULE IS DEPRECATED!! Please use individual
# simtools modules instead
#
# Author: Jan Engels, DESY
# Date: Sep, 2007
#
##################################################
# custom imports
from .baseilc import BaseILC
from .util import *
class SimToolsMaker(BaseILC):
""" Responsible for the SimTools installation. """
def __init__(self, userInput):
BaseILC.__init__(self, userInput, "SimToolsMaker", "SimToolsMaker")
self.hasCMakeBuildSupport = False
self.hasCMakeFindSupport = False
# set some cvs variables
#self.download.env["CVSROOT"]=":pserver:[email protected]:/home/cvs/soft"
self.download.supportedTypes = ["cvs"]
self.download.accessmode = "pserver"
self.download.server = "jlccvs.kek.jp"
self.download.root = "home/cvs/soft"
self.download.project = "SimToolsMaker/Release"
self.reqfiles = [ ["buildtools"] ]
self.reqmodules = [ "LCIO", "ROOT", "Geant4", "CLHEP", "Java" ]
def compile(self):
""" compile SimTools """
os.chdir( self.parent.installPath )
if( self.rebuild ):
opt="build"
else:
opt="all"
buildcmd="%s/buildtools -setup %s/build_env.sh -cvsroot %s %s" % \
(self.installPath,self.installPath,self.download.env["CVSROOT"],opt)
print(">", buildcmd)
if( os.system( buildcmd + " | tee -a " + self.logfile ) != 0 ):
self.abort( "failed to compile!!" )
def postCheckDeps(self):
BaseILC.postCheckDeps(self)
self.envorder=[ "LC_RELEASE_DIR", "LCBASEDIR", "KFLIBROOT", "LCLIBROOT", "LEDAROOT", \
"JSFROOT", "JUPITERROOT", "SATELLITESROOT", "URANUSROOT", "G4SYSTEM" ]
self.env["LC_RELEASE_DIR"]=self.parent.installPath
self.env["LCBASEDIR"]="$LC_RELEASE_DIR/lcbase"
self.env["KFLIBROOT"]="$LC_RELEASE_DIR/physsim"
self.env["LCLIBROOT"]="$LC_RELEASE_DIR/lclib"
self.env["LEDAROOT"]="$LC_RELEASE_DIR/Leda"
self.env["JSFROOT"]="$LC_RELEASE_DIR/jsf"
self.env["JUPITERROOT"]="$LC_RELEASE_DIR/Jupiter"
self.env["SATELLITESROOT"]="$LC_RELEASE_DIR/Satellites"
self.env["URANUSROOT"]="$LC_RELEASE_DIR/Uranus"
self.env["G4SYSTEM"]=self.parent.module("Geant4").env["G4SYSTEM"]
self.env["SOSYMLINK"]="true"
self.env["IMAKEINCLUDE"]="-I$LCBASEDIR -I$KFLIBROOT -I$LCLIBROOT"
# provide path to libg2c.so in SL3/SL4/SL5
if self.os_ver.isSL(4):
self.env.setdefault( "GFORTRANLIBDIR", "-L/usr/lib/gcc/i386-redhat-linux/4.1.0" )
if self.os_ver.isSL(3):
self.env.setdefault( "GFORTRANLIBDIR", "-L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3" )
if self.os_ver.isSL(5):
self.env.setdefault( "GFORTRANLIBDIR", "-L/usr/lib/gcc/x86_64-redhat-linux/3.4.6" ) # 64bit
#self.env.setdefault( "GFORTRANLIBDIR", "-L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/32" ) # 32bit
self.envpath["PATH"].append( "$LCBASEDIR/bin" )
self.envpath["PATH"].append( "$JSFROOT/bin" )
self.envpath["PATH"].append( "$LCLIBROOT/bin" )
self.envpath["PATH"].append( "$JUPITERROOT/$G4SYSTEM/bin" )
self.envpath["LD_LIBRARY_PATH"].append( "$JSFROOT/lib" )
self.envpath["LD_LIBRARY_PATH"].append( "$LEDAROOT/lib" )
self.envpath["LD_LIBRARY_PATH"].append( "$SATELLITESROOT/lib" )
self.envpath["LD_LIBRARY_PATH"].append( "$URANUSROOT/lib" )
self.envpath["LD_LIBRARY_PATH"].append( "$JUPITERROOT/lib/$G4SYSTEM" )
self.envcmds.append(" . ${G4ENV_INIT} ")