�
�"Kb� � �^ � d Z ddlZddlZddlZddlZddlmZ d� Zd� Z G d� de
� � ZdS )z+Visual Studio user preferences file writer.� Nc �b � d| v sd| v r| S t j � dd� � � t j � � }|D ]d}t j � || � � }t j � |� � r#t j |t j � � r|c S �e| S )a{ If there are no slashes in the command given, this function
searches the PATH env to find the given command, and converts it
to an absolute path. We have to do this because MSVS is looking
for an actual file to launch a debugger on, not just a command
line. Note that this happens at GYP time, so anything needing to
be built needs to have a full path.�/�\�PATH� )
�os�environ�get�split�pathsep�path�join�isfile�access�X_OK)�command�pathsr
�items �2/usr/lib/python3/dist-packages/gyp/MSVSUserFile.py�_FindCommandInPathr s� � � �G�^�^�t�w��� �N�
�J�N�N�6�"�%�%�+�+�B�J�7�7�E�� � ��
�W�\�\�$��
(�
(�d� ����� � � �"�)�D�"�'�":�":� ������ �.� c � � g }| D ]x}|� d� � dk r.d� |� d� � � � }d|z }nt j d|� � rd|z }|� |� � �y|S )N�"���z""z"%s"z[ \t\n])�findr r �re�search�append)�args�new_args�args r �_QuoteWin32CommandLineArgsr" |