HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/lib/python3.6/site-packages/gyp/__pycache__/MSVSUserFile.cpython-36.pyc
3

��S]��@sRdZddlZddlZddlZddlZddljZdd�Zdd�Z	Gdd�de
�ZdS)	z+Visual Studio user preferences file writer.�NcCshd|ksd|kr|Stjjdd�jtj�}x8|D]0}tjj||�}tjj|�r0tj|tj	�r0|Sq0W|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�item�r�"/usr/lib/python3.6/MSVSUserFile.py�_FindCommandInPaths
rcCs\g}xR|D]J}|jd�dkr6dj|jd��}d|}ntjd|�rJd|}|j|�q
W|S)N�"�z""z"%s"z[ \t\n]���)�findrr	�re�search�append)�argsZnew_args�argrrr�_QuoteWin32CommandLineArgs&s

rc@s6eZdZdZdd�Zdd�Zidfdd�Zd	d
�ZdS)�Writerz(Visual Studio XML user user file writer.cCs||_||_||_i|_dS)z�Initializes the user file.

    Args:
      user_file_path: Path to the user file.
      version: Version info.
      name: Name of the user file.
    N)�user_file_path�version�name�configurations)�selfr!r"r#rrr�__init__9szWriter.__init__cCsdd|ig|j|<dS)zTAdds a configuration to the project.

    Args:
      name: Configuration name.
    Z
Configuration�NameN)r$)r%r#rrr�	AddConfigFszWriter.AddConfigrcCs�t|�}t|d�}|r@t|t�r@dd�|j�D�}dj|�}nd}d||dj|dd��tj�|d	d
ddddddd
ddddddddd�g}||jkr�|j	|�|j|j
|�dS)a;Adds a DebugSettings node to the user file for a particular config.

    Args:
      command: command line to run.  First element in the list is the
        executable.  All elements of the command will be quoted if
        necessary.
      working_directory: other files which may trigger the rule. (optional)
    rcSsg|]\}}d||f�qS)z%s="%s"r)�.0�key�valrrr�
<listcomp>]sz+Writer.AddDebugSettings.<locals>.<listcomp>� rZ
DebugSettingsrN�trueZfalse�3�1�0)ZCommandZWorkingDirectoryZCommandArgumentsZ
RemoteMachineZEnvironmentZEnvironmentMergeZAttachZDebuggerTypeZRemoteZ
RemoteCommandZHttpUrlZPDBPathZSQLDebuggingZDebuggerFlavorZ
MPIRunCommandZMPIRunArgumentsZMPIRunWorkingDirectoryZApplicationCommandZApplicationArgumentsZShimCommandZ
MPIAcceptModeZMPIAcceptFilter)rr�
isinstance�dict�itemsr�socketZgethostnamer$r(r)r%Zconfig_namerZenvironmentZworking_directoryZabs_commandZenv_listZn_cmdrrr�AddDebugSettingsNsB



zWriter.AddDebugSettingscCsZdg}x$t|jj��D]\}}|j|�qWd|jj�|jd�|g}tj||j	dd�dS)zWrites the user file.ZConfigurationsZVisualStudioUserFile)ZVersionr'zWindows-1252)�encodingN)
�sortedr$r4rr"ZProjectVersionr#�easy_xmlZWriteXmlIfChangedr!)r%Zconfigs�config�specZcontentrrr�WriteIfChanged�s
zWriter.WriteIfChangedN)�__name__�
__module__�__qualname__�__doc__r&r(r6r<rrrrr 6s
8r )r@rrr5Z
gyp.commonZgypZgyp.easy_xmlr9rr�objectr rrrr�<module>s