MINI MINI MANI MO

Path : /usr/lib64/python3.6/distutils/__pycache__/
File Upload :
Current File : //usr/lib64/python3.6/distutils/__pycache__/spawn.cpython-36.pyc

3


 \@sdZddlZddlZddlmZmZddlmZddlm	Z	dddZ
d	d
ZdddZej
d
krvddlmZdadadddZdddZdS)zdistutils.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.
N)DistutilsPlatformErrorDistutilsExecError)DEBUG)logcCsNt|}tjdkr"t|||dn(tjdkr<t|||dntdtjdS)aRun 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.
    posix)dry_runntz1don't know how to spawn programs on platform '%s'N)listosname_spawn_posix	_spawn_ntr)cmdsearch_pathverboserr'/usr/lib64/python3.6/distutils/spawn.pyspawns

rcCs.x(t|D]\}}d|kr
d|||<q
W|S)zQuote command-line arguments for DOS/Windows conventions.

    Just wraps every argument which contains blanks in double quotes, and
    returns a new argument list.
     z"%s")	enumerate)argsiargrrr_nt_quote_args+srcCs|d}t|}|r t|p|}tjdj|g|dd|sytjtj||}Wn@tk
r}z$t	sp|}t
d||jdfWYdd}~XnX|dkrt	s|}t
d||fdS)Nrrrzcommand %r failed: %sz%command %r failed with exit status %d)rfind_executablerinfojoinrspawnvP_WAITOSErrorrrr)rrrr
executableZrcexcrrrr;s$&rdarwin)	sysconfigcCsxtjdj||rdS|d}|r*tjp.tj}d}tjdkrtdkrlt	j
dpRdatrlddtjdDatrtj
jdt}td	d|jdDkrd
|tf}t|ttj
|d}|rtjptj}tj}	|	dkrvy$|dkr|||n||||WnNtk
rL}
z0ts|}tjjd||
jftjd
WYdd}
~
XnXtsX|}tjjd|tjd
nxytj|	d\}	}WnDtk
r}z&ts|}td||jdfWYdd}~XnXtj|rts|}td|tj|fnltj|rBtj |}
|
dkr&dSts0|}td||
fn,tj!|rTqznts^|}td||fqzWdS)Nrrr$MACOSX_DEPLOYMENT_TARGETcSsg|]}t|qSr)int).0xrrr
<listcomp>esz _spawn_posix.<locals>.<listcomp>.cSsg|]}t|qSr)r()r)r*rrrr+kszF$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure)r&zunable to execute %r: %s
rz(unable to execute %r for unknown reasonszcommand %r failed: %sz"command %r terminated by signal %dz%command %r failed with exit status %dz1unknown error executing %r: termination status %dr)"rrrrexecvpexecvsysplatform_cfg_targetr%get_config_varsplit_cfg_target_splitenvirongetrdictexecvpeexecveforkr!rstderrwritestrerror_exitwaitpidrrWIFSIGNALEDWTERMSIG	WIFEXITEDWEXITSTATUS
WIFSTOPPED)rrrrr"Zexec_fnenvZ
cur_targetZmy_msgpideZstatusr#Zexit_statusrrrr
Xs



&

r
cCs|dkrtjjdtj}|jtj}tjj|\}}tj	dkrN|dkrN|d}tjj
|sx*|D]"}tjj||}tjj
|r`|Sq`WdS|SdS)zTries 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.
    NPATHZwin32z.exe)rr5r6defpathr3pathseppathsplitextr/r0isfiler)r"rKpathsbaseZextpfrrrrs
r)rrr)rrr)rrr)N)__doc__r/rZdistutils.errorsrrZdistutils.debugrZ	distutilsrrrrr0r%r1r4r
rrrrr<module>s



Q

OHA YOOOO