7 import Configuration.PyReleaseValidation
8 from Configuration.PyReleaseValidation.ConfigBuilder
import ConfigBuilder, defaultOptions
9 from Configuration.PyReleaseValidation.cmsDriverOptions
import options, python_config_filename
12 configBuilder =
ConfigBuilder(options, with_output =
True, with_input =
True)
13 configBuilder.prepare()
16 if options.python_filename: python_config_filename = options.python_filename
17 config =
file(python_config_filename,
"w")
18 config.write(configBuilder.pythonCfgCode)
22 if options.dump_python:
24 execfile(python_config_filename, result)
25 process = result[
"process"]
26 expanded = process.dumpPython()
27 expandedFile =
file(python_config_filename,
"w")
28 expandedFile.write(expanded)
30 print "Expanded config file", python_config_filename,
"created"
33 if options.no_exec_flag:
34 print "Config file "+python_config_filename+
" created"
37 commandString = options.prefix+
" cmsRun"
38 print "Starting "+commandString+
' '+python_config_filename
39 commands = commandString.lstrip().
split()
40 os.execvpe(commands[0],commands+[python_config_filename],os.environ)