1j{dZddlmZddlZddlZddlZddlZddlZddlZddl 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)/zdistutils.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 R/opt/cloudlinux/venv/lib64/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_pathboolverbose _ENV | Nonectjtj||r!t j|d}|||d< tj|t|dS#t$r3}tdt|d|j d|d}~wtj $r-}tdt|d|j |d}~wwxYw)aNRun 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. Raise DistutilsExecError if running the program fails in any way; just return on success. rNr*zcommand z failed: z failed with exit code )r info subprocess list2cmdlineshutilwhich check_callr$OSErrorr rargsCalledProcessError returncode)rr1r3r executableexcerrs rspawnrD7s(HZ $S ) )*** \#a&))  !CF c'8'='=>>>>>>  =vc{{ = =sx| = =     ( Mvc{{ M MS^ M M   s$ #A00 C':.B((C':(C""C'rAstrpath 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.rFsplitextsysrisfiler/getconfstrAttributeError ValueErrordefpathsplitpathsepjoin)rArF_extpathspfs rfind_executablera^sM  M57IVWW  j ) )FAs cVmm&(  w~~j!! |z~~fd++ < "z),,"J/ " " "z " t JJrz " "E  GLLJ ' ' 7>>!   HHH  4s B55CC)rrrr)rr%rr&)rrrr)rrrr,)TFN) rr0r1r2r3r2rr4rr%r()rArErFrGrrG)__doc__ __future__rr.rr:r8rRrNcollections.abcrrtypingrrr_logr debugr errorsr rrrr$r!rDrar)rrris #"""""   444444443333333333&&&&&&  GKw / / / $$$'''' 000 0 ... .....  $$$$$N$$$$$$$r