grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a ´i4ã@sndZddlZddlZddlZddlmZmZddlmZddl m Z ej dkrVda da d dd „Zd d d „ZdS)zì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. éN)ÚDistutilsPlatformErrorÚDistutilsExecError)ÚDEBUG)ÚlogÚdarwinéc CsŽt|ƒ}t d |¡¡|r dS|r@t|dƒ}|dur@||d<d}tjdkrøtdurˆddlm }|  d¡pndatrˆdd „t  d ¡Dƒa trøt j dt¡}d d „|  d ¡Dƒ}t dd …d dgkrê|dd …d dgkrêd|tf} t| ƒ‚tt j|d�}z tj||d�} |  ¡| j} WnLt�yd} z2t�s8|d}td|| jdfƒ| ‚WYd} ~ n d} ~ 00| �rŠt�sz|d}td|| fƒ‚dS)a�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. ú Nrr)Ú sysconfigÚMACOSX_DEPLOYMENT_TARGETÚcSsg|] }t|ƒ‘qS©©Úint©Ú.0Úxr r ú'/usr/lib64/python3.9/distutils/spawn.pyÚ <ózspawn..Ú.cSsg|] }t|ƒ‘qSr r rr r rrDréé éz]$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure;must use 10.3 or later)r )Úenvzcommand %r failed: %séÿÿÿÿz#command %r failed with exit code %s)ÚlistrÚinfoÚjoinÚfind_executableÚsysÚplatformÚ _cfg_targetÚ distutilsr Zget_config_varÚsplitÚ_cfg_target_splitÚosÚenvironÚgetrÚdictÚ subprocessÚPopenÚwaitÚ returncodeÚOSErrorrrÚargs) ÚcmdÚ search_pathÚverboseÚdry_runÚ executablerr Z cur_targetZcur_target_splitZmy_msgÚprocÚexitcodeÚexcr r rÚspawns`   ÿÿ(ýÿ ÿÿ ÿr7c CsÈtj |¡\}}tjdkr*|dkr*|d}tj |¡r:|S|dur„tj dd¡}|dur„zt d¡}Wnt t fy‚tj }Yn0|sŒdS|  tj ¡}|D]&}tj ||¡}tj |¡rœ|SqœdS)zÚ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. Úwin32z.exeNÚPATHÚCS_PATH)r%ÚpathÚsplitextrr Úisfiler&r'ÚconfstrÚAttributeErrorÚ ValueErrorÚdefpathr#Úpathsepr)r3r;Ú_ÚextÚpathsÚpÚfr r rr_s(     r)rrr)N)Ú__doc__rr%r)Zdistutils.errorsrrZdistutils.debugrr"rr r!r$r7rr r r rÚs    H