\d4xdZddlZddlZddlZddlmZmZddlmZddl m Z ej dkrda da d dZd d ZdS) 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)logdarwinct|}tjd||rdS|rt |d}|||d<d}t jdkrtHddlm }| dpdatr$dt d Da trtjdt}d | d D}tdd d d gkr-|dd d d gkrd|dtd} t!| t#tj|} t%j||} | | j} nB#t,$r5} t.s|d}t1d|d| jd| d} ~ wwxYw| r$t.s|d}t1d|d| dS)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.  Nrr) sysconfigMACOSX_DEPLOYMENT_TARGETc,g|]}t|Sint.0xs ..\python\lib\distutils\spawn.py zspawn..<s$L$L$LSVV$L$L$L.c,g|]}t|Srrrs rrzspawn..DsFFF1AFFFr z)$MACOSX_DEPLOYMENT_TARGET mismatch: now "z" but "z)" during configure;must use 10.3 or later)r )envzcommand z failed: z failed with exit code )listrinfojoinfind_executablesysplatform _cfg_target distutilsr get_config_varsplit_cfg_target_splitosenvirongetrdict subprocessPopenwait returncodeOSErrorrrargs) cmd search_pathverbosedry_run executablerr cur_targetcur_target_splitmy_msgprocexitcodeexcs rspawnr?sn$ s))CHSXXc]] $SV,,  !CF C |x   + + + + + +#22"<>>DAC  M$L$L[5F5Fs5K5K$L$L$L!  < (BKPPJFF 0@0@0E0EFFF  !$Q//4DRaR4HBPQ74R4R4R$.::{{{<-V444rz0:<<>!   HHH  4sBB98B9)rrr)N)__doc__r#r*r.distutils.errorsrrdistutils.debugrr&rr$r%r)r?r"rrrrTs GGGGGGGG!!!!!!<8KEGEGEGEGP""""""r