Mini Kabibi Habibi
�
Ŕ�dc @ s� d Z d Z d d l Z d d l Z d d l m Z m Z d d l m Z d d l m
Z
d d l m Z d d d d
� Z d � Z
d d d d � Z d d d d
� Z e j d k r� d d l m Z d a d a n d d d d � Z d d � Z d S( s� distutils.spawn
Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
s $Id$i����N( t DistutilsPlatformErrort DistutilsExecError( t DEBUG( t log( t list2cmdlinei i c C s� t | � } t j d k r1 t | | d | �nZ t j d k rV t | | d | �n5 t j d k r{ t | | d | �n t d t j � d S( s� Run another program, specified as a command list 'cmd', in a new process.
'cmd' is just the argument list for the new process, ie.
cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
There is no way to run a program with a name different from that of its
executable.
If 'search_path' is true (the default), the system's executable
search path will be used to find the program; otherwise, cmd[0]
must be the exact path to the executable. If 'dry_run' is true,
the command will not actually be run.
Raise DistutilsExecError if running the program fails in any way; just
return on success.
t posixt dry_runt ntt os2s1 don't know how to spawn programs on platform '%s'N( t listt ost namet _spawn_posixt _spawn_ntt
_spawn_os2R ( t cmdt search_patht verboseR ( ( s4 D:/a/msys64/mingw64/lib/python2.7/distutils/spawn.pyt spawn s c C s8 x1 t | � D]# \ } } t | | g � | | <q
W| S( s+ Quote command-line arguments for DOS/Windows conventions.
Defer to list2cmdline as the logic is complex.
The previous implementation here failed to handle
-DG_LOG_DOMAIN="GEGL-"__FILE__ which was encountered in MSYS2
while building the gobject-introspection part of GEGL 0.3.4.
( t enumerateR ( t argst it arg( ( s4 D:/a/msys64/mingw64/lib/python2.7/distutils/spawn.pyt _nt_quote_args0 s c C s� | d } t | � } | r1 t | � p+ | } n t j d j | g | d � � | s� y t j t j | | � } Wn9 t k
r� } t s� | } n t
d | | d f � n X| d k r� t s� | } n t
d | | f � q� n d S( Ni t i s command %r failed: %si����s% command %r failed with exit status %d( R t find_executableR t infot joinR
t spawnvt P_WAITt OSErrorR R ( R R R R t
executablet rct exc( ( s4 D:/a/msys64/mingw64/lib/python2.7/distutils/spawn.pyR
<