Home | History | Annotate | Download | only in distutils

Lines Matching refs:cmd

18 def spawn(cmd, search_path=1, verbose=0, dry_run=0):
19 """Run another program, specified as a command list 'cmd', in a new process.
21 'cmd' is just the argument list for the new process, ie.
22 cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
27 search path will be used to find the program; otherwise, cmd[0]
34 # cmd is documented as a list, but just in case some code passes a tuple
36 cmd = list(cmd)
38 _spawn_posix(cmd, search_path, dry_run=dry_run)
40 _spawn_nt(cmd, search_path, dry_run=dry_run)
42 _spawn_os2(cmd, search_path, dry_run=dry_run)
63 def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0):
64 executable = cmd[0]
65 cmd = _nt_quote_args(cmd)
69 log.info(' '.join([executable] + cmd[1:]))
73 rc = os.spawnv(os.P_WAIT, executable, cmd)
77 cmd = executable
79 "command %r failed: %s" % (cmd, exc[-1])
83 cmd = executable
85 "command %r failed with exit status %d" % (cmd, rc)
87 def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0):
88 executable = cmd[0]
92 log.info(' '.join([executable] + cmd[1:]))
96 rc = os.spawnv(os.P_WAIT, executable, cmd)
100 cmd = executable
102 "command %r failed: %s" % (cmd, exc[-1])
106 cmd = executable
107 log.debug("command %r failed with exit status %d" % (cmd, rc))
109 "command %r failed with exit status %d" % (cmd, rc)
116 def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0):
117 log.info(' '.join(cmd))
120 executable = cmd[0]
148 exec_fn(executable, cmd)
150 exec_fn(executable, cmd, env)
153 cmd = executable
155 (cmd, e.strerror))
159 cmd = executable
160 sys.stderr.write("unable to execute %r for unknown reasons" % cmd)
173 cmd = executable
175 "command %r failed: %s" % (cmd, exc[-1])
178 cmd = executable
181 (cmd, os.WTERMSIG(status))
189 cmd = executable
192 (cmd, exit_status)
199 cmd = executable
202 (cmd, status)