Mini Kabibi Habibi

Current Path : C:/Users/ITO/AppData/Local/Programs/GIMP 2/lib/python2.7/distutils/
Upload File :
Current File : C:/Users/ITO/AppData/Local/Programs/GIMP 2/lib/python2.7/distutils/spawn.pyo

�
Ŕ�dc@s�dZdZddlZddlZddlmZmZddlmZddl	m
Z
ddlmZdd	d	d
�Zd�Z
dd	d	d�Zdd	d	d
�Zejdkr�ddl	mZdadandd	d	d�Zdd�ZdS(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(tDistutilsPlatformErrortDistutilsExecError(tDEBUG(tlog(tlist2cmdlineiicCs�t|�}tjdkr1t||d|�nZtjdkrVt||d|�n5tjdkr{t||d|�ntdtj�dS(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.
    tposixtdry_runtnttos2s1don't know how to spawn programs on platform '%s'N(tlisttostnamet_spawn_posixt	_spawn_ntt
_spawn_os2R(tcmdtsearch_pathtverboseR((s4D:/a/msys64/mingw64/lib/python2.7/distutils/spawn.pytspawnscCs8x1t|�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(targstitarg((s4D:/a/msys64/mingw64/lib/python2.7/distutils/spawn.pyt_nt_quote_args0scCs�|d}t|�}|r1t|�p+|}ntjdj|g|d��|s�ytjtj||�}Wn9tk
r�}t	s�|}nt
d||df�nX|dkr�t	s�|}nt
d||f�q�ndS(Nit iscommand %r failed: %si����s%command %r failed with exit status %d(Rtfind_executableRtinfotjoinR
tspawnvtP_WAITtOSErrorRR(RRRRt
executabletrctexc((s4D:/a/msys64/mingw64/lib/python2.7/distutils/spawn.pyR
<s$
!		cCs�|d}|r%t|�p|}ntjdj|g|d��|s�ytjtj||�}Wn9tk
r�}ts�|}nt	d||df�nX|dkr�ts�|}ntj
d||f�t	d||f�q�ndS(NiRiscommand %r failed: %si����s%command %r failed with exit status %d(RRRRR
RRRRRtdebug(RRRRRR R!((s4D:/a/msys64/mingw64/lib/python2.7/distutils/spawn.pyRTs$
!		tdarwin(t	sysconfigcCs_tjdj|��|r dS|d}|r9tjp?tj}d}tjdkrGt	dkr�t
jd�puda	t	r�gt	jd�D]}t
|�^q�aq�nt	rGtjjdt	�}tg|jd�D]}t
|�^q�krd|t	f}	t|	��nttjd|�}|r8tjp>tj}qGntj�}
|
dkry0|dkr~|||�n||||�WnLtk
r�}ts�|}ntjjd||jf�tjd	�nXts�|}ntjjd
|�tjd	�nJxGytj|
d�\}
}Wn]tk
r�}
ddl}|
j|jkrfqntsu|}ntd||
df�nXtj |�r�ts�|}ntd
|tj!|�f�qtj"|�r tj#|�}|dkr�dSts
|}ntd||f�qtj$|�r5qqtsD|}ntd||f�qWdS(NRiR#tMACOSX_DEPLOYMENT_TARGETtt.sF$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configuresunable to execute %r: %s
is(unable to execute %r for unknown reasonsi����scommand %r failed: %ss"command %r terminated by signal %ds%command %r failed with exit status %ds1unknown error executing %r: termination status %d(%RRRR
texecvptexecvtNonetsystplatformt_cfg_targetR$tget_config_vartsplittintt_cfg_target_splittenvirontgetRtdicttexecvpetexecvetforkRRtstderrtwritetstrerrort_exittwaitpidterrnotEINTRRtWIFSIGNALEDtWTERMSIGt	WIFEXITEDtWEXITSTATUSt
WIFSTOPPED(RRRRRtexec_fntenvtxt
cur_targettmy_msgtpidtetstatusR!R=texit_status((s4D:/a/msys64/mingw64/lib/python2.7/distutils/spawn.pyRqs�
..
							cCs�|dkr'tjjdtj�}n|jtj�}tjj|�\}}t	j
dksotjdkr�|dkr�|d}ntjj|�s�x9|D]1}tjj
||�}tjj|�r�|Sq�WdS|SdS(s�Tries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    tPATHtwin32Rs.exeN(R*R
R2R3tdefpathR/tpathseptpathtsplitextR+R,RtisfileR(RRQtpathstbasetexttptf((s4D:/a/msys64/mingw64/lib/python2.7/distutils/spawn.pyR�s*

(t__doc__t__revision__R+R
tdistutils.errorsRRtdistutils.debugRt	distutilsRRRRR
RR,R$R*R-R1RR(((s4D:/a/msys64/mingw64/lib/python2.7/distutils/spawn.pyt<module>s"		X