%PDF- %PDF-
| Direktori : /lib64/python3.9/site-packages/numpy/distutils/__pycache__/ |
| Current File : //lib64/python3.9/site-packages/numpy/distutils/__pycache__/_shell_utils.cpython-39.pyc |
a
z[yc5
� @ s� d Z ddlZddlZddlZzddlmZ W n eyJ ddlmZ Y n0 g d�ZG dd� d�ZG dd� d�Z G d d
� d
�Z
ejdkr�e Znejdkr�e
ZdS )
zq
Helper functions for interacting with the shell, and consuming shell-style
parameters provided in config files.
� N��quote)�
WindowsParser�PosixParser�NativeParserc @ s( e Zd ZdZedd� �Zedd� �ZdS )�CommandLineParsera
An object that knows how to split and join command-line arguments.
It must be true that ``argv == split(join(argv))`` for all ``argv``.
The reverse neednt be true - `join(split(cmd))` may result in the addition
or removal of unnecessary escaping.
c C s t �dS )z5 Join a list of arguments into a command line string N��NotImplementedError��argv� r �B/usr/lib64/python3.9/site-packages/numpy/distutils/_shell_utils.py�join s zCommandLineParser.joinc C s t �dS )z6 Split a command line string into a list of arguments Nr ��cmdr r r
�split s zCommandLineParser.splitN��__name__�
__module__�__qualname__�__doc__�staticmethodr r r r r r
r s
r c @ s( e Zd ZdZedd� �Zedd� �ZdS )r z�
The parsing behavior used by `subprocess.call("string")` on Windows, which
matches the Microsoft C/C++ runtime.
Note that this is _not_ the behavior of cmd.
c C s
t �| �S �N)�
subprocessZlist2cmdliner
r r r
r * s zWindowsParser.joinc s� dd l }z
|j W n ty( t�Y n0 | s2g S d| } |jjj}|�|j�|_|j|�|j �f|_
|� � }|| |�|��� � fdd�t|j
�D �}|jj�� �r�J �|d dks�J �|dd � S )Nr zdummy c s g | ]}� | �qS r r )�.0�i�Zlpargsr r
�
<listcomp>C � z'WindowsParser.split.<locals>.<listcomp>Zdummy� )�ctypesZwindll�AttributeErrorr Zshell32�CommandLineToArgvWZPOINTERZ c_wchar_pZrestypeZc_int�argtypesZbyref�range�valueZkernel32Z LocalFree)r r r"