16 import Configuration.PyReleaseValidation
17 from Configuration.PyReleaseValidation.ConfigBuilder
import ConfigBuilder, defaultOptions
18 from Configuration.PyReleaseValidation.cmsDriverOptions
import options, python_config_filename
21 configBuilder =
ConfigBuilder(options, with_output =
True, with_input =
True)
22 configBuilder.prepare()
25 if options.python_filename: python_config_filename = options.python_filename
26 config =
file(python_config_filename,
"w")
27 config.write(configBuilder.pythonCfgCode)
31 if options.dump_python:
33 execfile(python_config_filename, result)
34 process = result[
"process"]
35 expanded = process.dumpPython()
36 expandedFile =
file(python_config_filename,
"w")
37 expandedFile.write(expanded)
39 print "Expanded config file", python_config_filename,
"created"
42 if options.no_exec_flag:
43 print "Config file "+python_config_filename+
" created"
46 commandString = options.prefix+
" cmsRun"
47 print "Starting "+commandString+
' '+python_config_filename
48 commands = commandString.lstrip().
split()
49 os.execvpe(commands[0],commands+[python_config_filename],os.environ)