%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/setuptools/_distutils/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/setuptools/_distutils/__pycache__/spawn.cpython-312.pyc

�


_�d�
��T�dZddlZddlZddlZddlmZddlmZddlm	Z	d	d�Z
d
d�Zy)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�)�DistutilsExecError)�DEBUG)�logc�l�t|�}tjtj|��|ry|rt|d�}|�||d<|�|nt
tj�}tjdk(rddlm}m
}|�}|r|||<	tj||��}	|	j�|	j }
|
r&t$s|d}t'dj)||
���y#t"$r9}t$s|d}t'dj)||j*d��|�d}~wwxYw)	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.
    Nr�darwin)�MACOSX_VERSION_VAR�get_macosx_target_ver)�envzcommand {!r} failed: {}���z%command {!r} failed with exit code {})�listr�info�
subprocess�list2cmdline�find_executable�dict�os�environ�sys�platform�distutils.utilr	r
�Popen�wait�
returncode�OSErrorrr�format�args)�cmd�search_path�verbose�dry_runr�
executabler	r
�macosx_target_ver�proc�exitcode�excs            �=/usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py�spawnr(s&��$�s�)�C��H�H�Z�
$�
$�S�
)�*����$�S��V�,�
��!��C��F���#�d�2�:�:�&6�C�
�|�|�x��L�1�3���&7�C�"�#�	������-���	�	���?�?�����a�&�C� �3�:�:�3��I�
�	
�������a�&�C� �%�,�,�S�#�(�(�2�,�?�
��	���s�3C1�1	D3�:4D.�.D3c�Z�tjj|�\}}tjdk(r
|dk7r|dz}tjj|�r|S|�8tjjdd�}|�	tjd�}|sy|jtj�}|D]E}tjj||�}tjj|�s�C|cSy#ttf$rtj}Y��wxYw)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�get�confstr�AttributeError�
ValueError�defpath�split�pathsep�join)r"r-�_�ext�paths�p�fs       r'rrKs����W�W�
�
�j�
)�F�A�s������c�V�m��&�(�
�	�w�w�~�~�j�!����|��z�z�~�~�f�d�+���<�
"��z�z�)�,�����J�J�r�z�z�"�E�
����G�G�L�L��J�'��
�7�7�>�>�!���H�	�
��!#�J�/�
"��z�z��
"�s�D�D*�)D*)rrrN)N)�__doc__rrr�errorsr�debugr�_logrr(r��r'�<module>rCs)����	��&���6
�r"rB

Zerion Mini Shell 1.0