HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/setuptools/_distutils/__pycache__/spawn.cpython-310.pyc
o

��h��@sdZddlmZddlZddlZddlZddlZddlZddlZddl	m
Z
mZddlm
Z
mZmZddlmZddlmZdd	lmZe
rLdd
lmZede
d�Zd
d�Zd-dd�Zed.dd��Zed/dd��Zd0dd�Z				d1d2d%d&�Zd3d4d+d,�ZdS)5z�distutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
�)�annotationsN)�Mapping�MutableSequence)�
TYPE_CHECKING�TypeVar�overload�)�log��DEBUG)�DistutilsExecError)�_ENV�	_MappingT)�boundcCstr|S|dS)zE
    Render a subprocess command differently depending on DEBUG.
    rr
)�cmd�r�F/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/spawn.py�_debugsr�env�_MappingT | None�return�'_MappingT | dict[str, str | int] | NonecCsFt��dkr|Sddlm}m}|�}|r||ini}it|��|�S)N�Darwinr)�MACOSX_VERSION_VAR�get_macosx_target_ver)�platform�system�utilrr�_resolve)rrr�
target_ver�updaterrr�_inject_macos_ver$sr!�None�os._Environ[str]cC�dS�Nr�rrrrr/�rcCr$r%rr&rrrr1r'�_MappingT | os._Environ[str]cCs|durtjS|Sr%)�os�environr&rrrr3sTFr�/MutableSequence[bytes | str | os.PathLike[str]]�search_path�bool�verbose�dry_run�_ENV | Nonec
Cs�t�t�|��|rdS|rt�|d�}|dur||d<ztj|t|�d�WdStyE}zt	dt
|��d|jd���|�d}~wtjy_}zt	dt
|��d|j
���|�d}~ww)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&zcommand z	 failed: ���z failed with exit code )r	�info�
subprocess�list2cmdline�shutil�which�
check_callr!�OSErrorrr�args�CalledProcessError�
returncode)rr,r.r/r�
executable�exc�errrrr�spawn7s0�������r?r<�str�path�
str | Nonec	Cs�tjdtdd�tj�|�\}}tjdkr|dkr|d}tj�|�r%|S|durJtj	�
dd�}|durJzt�d�}Wntt
fyItj}Ynw|sNdS|�tj�}|D]}tj�||�}tj�|�ri|SqVdS)	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.
    z+Use shutil.which instead of find_executable�)�
stacklevel�win32z.exeN�PATH�CS_PATH)�warnings�warn�DeprecationWarningr)rA�splitext�sysr�isfiler*�get�confstr�AttributeError�
ValueError�defpath�split�pathsep�join)r<rA�_�ext�paths�p�frrr�find_executablebs2�
��r[)rrrr)rr"rr#)rrrr)rrrr()TFFN)rr+r,r-r.r-r/r-rr0rr"r%)r<r@rArBrrB)�__doc__�
__future__rr)rr5r3rLrH�collections.abcrr�typingrrr�_logr	�debugr�errorsrr
rrr!rr?r[rrrr�<module>s:

�+