本文整理匯總了Python中PACKAGE.standardSetup方法的典型用法代碼示例。如果您正苦於以下問題:Python PACKAGE.standardSetup方法的具體用法?Python PACKAGE.standardSetup怎麽用?Python PACKAGE.standardSetup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PACKAGE
的用法示例。
在下文中一共展示了PACKAGE.standardSetup方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: getEnvironment
# 需要導入模塊: import PACKAGE [as 別名]
# 或者: from PACKAGE import standardSetup [as 別名]
def getEnvironment(config=None):
import sys
import os.path
import PACKAGE
PACKAGE.standardSetup()
return
示例2: getEnvironment
# 需要導入模塊: import PACKAGE [as 別名]
# 或者: from PACKAGE import standardSetup [as 別名]
def getEnvironment(config={}):
import sys
import os.path
import PACKAGE
PACKAGE.standardSetup()
arch = platform.machine()
if not arch == "x86_64":
logger.error("GangaCMS> %s not supported. Different than 64 bits." % (arch))
return
logger.info("GangaCMS> not supported different OS than SLC5")
config = Ganga.Utility.Config.getConfig("CMSSW")
cmssw_version = config["CMSSW_VERSION"]
cmssw_setup = config["CMSSW_SETUP"]
crab_version = config["CRAB_VERSION"]
cmssw_setup_script = os.path.join(cmssw_setup, "CMSSW_generic.sh")
if not os.path.exists(cmssw_setup_script):
logger.error('GangaCMS> CMSSW setup script not found: "%s"' % (cmssw_setup_script))
return
location = config["location"]
cmsswhome = os.path.join(location, cmssw_version)
if not os.path.exists(cmsswhome):
logger.error('GangaCMS> CMSSW location not found: "%s"' % (cmsswhome))
return
# from Ganga.Utility.Shell import Shell
# shell = Shell(cmssw_setup_script)
logger.info("GangaCMS> [INFO] getEnvironment : done")
# return shell.env
return {}
示例3: standardSetup
# 需要導入模塊: import PACKAGE [as 別名]
# 或者: from PACKAGE import standardSetup [as 別名]
def standardSetup():
import os.path
import PACKAGE
PACKAGE.standardSetup()
arch = platform.machine()
if not arch == 'x86_64':
logger.error('GangaCMS> %s not supported. Different than 64 bits.'%(arch))
return
logger.info('GangaCMS> not supported different OS than SLC5')
config = Ganga.Utility.Config.getConfig('CMSSW')
cmssw_version = config['CMSSW_VERSION']
cmssw_setup = config['CMSSW_SETUP']
crab_version = config['CRAB_VERSION']
cmssw_setup_script = os.path.join(cmssw_setup,'CMSSW_generic.sh')
if not os.path.exists(cmssw_setup_script):
logger.error('GangaCMS> CMSSW setup script not found: "%s"'%(cmssw_setup_script))
return
location = config['location']
cmsswhome = os.path.join(location,cmssw_version)
if not os.path.exists(cmsswhome):
logger.error('GangaCMS> CMSSW location not found: "%s"'%(cmsswhome))
return
# from Ganga.Utility.Shell import Shell
# shell = Shell(cmssw_setup_script)
logger.info('GangaCMS> [INFO] getEnvironment : done')
示例4: getEnvironment
# 需要導入模塊: import PACKAGE [as 別名]
# 或者: from PACKAGE import standardSetup [as 別名]
def getEnvironment( config = {} ):
import sys
import os.path
import PACKAGE
PACKAGE.standardSetup()
print 'GangaCMS> getEnvironment : done'
return
示例5: getEnvironment
# 需要導入模塊: import PACKAGE [as 別名]
# 或者: from PACKAGE import standardSetup [as 別名]
def getEnvironment(c):
import PACKAGE
PACKAGE.standardSetup()
# set up X509_CERT_DIR for DQ2
from Ganga.Utility.GridShell import getShell
gshell = getShell()
if gshell:
try:
return { 'X509_CERT_DIR' : gshell.env['X509_CERT_DIR'], 'X509_USER_PROXY' : gshell.env['X509_USER_PROXY'] }
except KeyError:
return { 'X509_CERT_DIR' : '/etc/grid-security/certificates' }
示例6: getEnvironment
# 需要導入模塊: import PACKAGE [as 別名]
# 或者: from PACKAGE import standardSetup [as 別名]
def getEnvironment(c):
import PACKAGE
PACKAGE.standardSetup()
return {}
示例7: getEnvironment
# 需要導入模塊: import PACKAGE [as 別名]
# 或者: from PACKAGE import standardSetup [as 別名]
def getEnvironment( config = {} ):
import PACKAGE
PACKAGE.standardSetup()