S xdZddlmZddlZddlZddlZddlZddlZddlZddl m Z m Z ddl m Z mZmZddlmZddlmZdd lmZe rdd lmZed e Zd Zd(dZed)dZed*dZd+dZ d,d-d"Zd.d/d'ZdS)0zdistutils.spawn Provides the 'spawn()' function, a front-end to various platform- specific functions for launching another program in a sub-process. ) annotationsN)MappingMutableSequence) TYPE_CHECKINGTypeVaroverload)logDEBUG)DistutilsExecError)_ENV _MappingT)boundc$tr|n|dS)zE Render a subprocess command differently depending on DEBUG. rr )cmds m/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/setuptools/_distutils/spawn.py_debugrs #33SV#env_MappingT | Nonereturn'_MappingT | dict[str, str | int] | Nonectjdkr|Sddlm}m}|}|r||ini}it ||S)NDarwinr )MACOSX_VERSION_VARget_macosx_target_ver)platformsystemutilrr_resolve)rrr target_verupdates r_inject_macos_verr$$skH$$ ????????&&((J1; C * - -F &hsmm &v &&rNoneos._Environ[str]cdSNrs rr!r!/s-0SrcdSr(r)r*s rr!r!1s+.3r_MappingT | os._Environ[str]c"| tjn|Sr()osenvironr*s rr!r!3s2::#-rTFr/MutableSequence[bytes | str | os.PathLike[str]] search_pathboolverbosedry_run _ENV | Nonectjtj||rdS|r!t j|d}|||d< tj|t|dS#t$r3}tdt|d|j d|d}~wtj $r-}tdt|d|j |d}~wwxYw)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*zcommand z failed: z failed with exit code )r info subprocess list2cmdlineshutilwhich check_callr$OSErrorr rargsCalledProcessError returncode)rr1r3r4r executableexcerrs rspawnrE7s,HZ $S ) )*** \#a&))  !CF c'8'='=>>>>>>  =vc{{ = =sx| = =     ( Mvc{{ M MS^ M M   s$#A44 C+>.B,,C+>(C&&C+rBstrpath str | Nonectjdtdtj|\}}t jdkr |dkr|dz}tj|r|S|[tj dd}|9 tj d}n##ttf$rtj}YnwxYw|sdS|tj}|D]E}tj||}tj|r|cSFdS) 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. z+Use shutil.which instead of find_executable) stacklevelwin32z.exeNPATHCS_PATH)warningswarnDeprecationWarningr.rGsplitextsysrisfiler/getconfstrAttributeError ValueErrordefpathsplitpathsepjoin)rBrG_extpathspfs rfind_executablerbbsM  M57IVWW  j ) )FAs cVmm&(  w~~j!! |z~~fd++ < "z),,"J/ " " "z " t JJrz " "E  GLLJ ' ' 7>>!   HHH  4s B55CC)rrrr)rr%rr&)rrrr)rrrr,)TFFN) rr0r1r2r3r2r4r2rr5rr%r()rBrFrGrHrrH)__doc__ __future__rr.rr;r9rSrOcollections.abcrrtypingrrr_logr debugr errorsr rrrr$r!rErbr)rrrjs #"""""   444444443333333333&&&&&&  GKw / / / $$$'''' 000 0 ... .....  (((((V$$$$$$$r