HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/distlib/__pycache__/markers.cpython-310.pyc
o

>��a��@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZdgZ
e�d�Zd	d
�Zdd�ZGd
d�de�Ze�d�Zdd�Ze�Z[e�Zddd�ZdS)zG
Parser for the environment markers micro-language defined in PEP 508.
�N�)�string_types)�in_venv�parse_marker)�NormalizedVersion�	interpretz<((\d+(\.\d+)*\w*)|\'(\d+(\.\d+)*\w*)\'|\"(\d+(\.\d+)*\w*)\")cCst|t�r|s	dS|ddvS)NFr�'")�
isinstancer)�o�r�1/usr/lib/python3/dist-packages/distlib/markers.py�_is_literalsr
cCs2g}t�|�D]
}|�t|��d��qt|�S)Nr)�_VERSION_PATTERN�finditer�append�NV�groups�set)�s�result�mrrr�
_get_versions!src
@sfeZdZdZdd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�d�Zdd�ZdS)�	Evaluatorz;
    This class is used to evaluate marker expessions.
    cC�||kS�Nr��x�yrrr�<lambda>-�zEvaluator.<lambda>cCrrrrrrrr.rcC�||kp||kSrrrrrrr/�cCs||kSrrrrrrr0rcCs||kSrrrrrrr1rcCs||kp||kSrrrrrrr2r!cCs||kSrrrrrrr3rcCr rrrrrrr4r!cCs|o|Srrrrrrr5rcCs|p|Srrrrrrr6rcCs||vSrrrrrrr7rcCs||vSrrrrrrr8r)�==�===�~=�!=�<�<=�>�>=�and�or�in�not inc	Cs"t|t�r#|ddvr|dd�}|S||vrtd|��||}|St|t�s*J�|d}||jvr9td|��|d}|d	}t|d�rVt|d	�rVtd
|||f��|�||�}|�||�}|dksj|dkrw|dvrwt|�}t|�}n|dkr�|d
vr�t|�}t	|�}|j|||�}|S)z�
        Evaluate a marker expression returned by the :func:`parse_requirement`
        function in the specified context.
        rrr���zunknown variable: %s�opzop not implemented: %s�lhs�rhszinvalid comparison: %s %s %s�python_version)r&r'r(r)r#r"r%r$)r,r-)
r	r�SyntaxError�dict�
operations�NotImplementedErrorr
�evaluaterr)	�self�expr�contextrr/�elhs�erhsr0r1rrrr7;s6
��

zEvaluator.evaluateN)�__name__�
__module__�__qualname__�__doc__r5r7rrrrr's �rz\d+\.\d+c
Cs�dd�}ttd�r|tjj�}tjj}nd}d}t��}t�|�}|�	d�}||t
jt��t��t�
�t��t��tt��||tjd�}|S)NcSs<d|j|j|jf}|j}|dkr||dt|j�7}|S)Nz%s.%s.%s�finalr)�major�minor�micro�releaselevel�str�serial)�info�version�kindrrr�format_full_version`s
z,default_context.<locals>.format_full_version�implementation�0�r)�implementation_name�implementation_version�os_name�platform_machine�platform_python_implementation�platform_release�platform_system�platform_version�platform_in_venv�python_full_versionr2�sys_platform)�hasattr�sysrLrI�name�platformr2�_DIGITS�match�group�os�machine�python_implementation�release�systemrFr)rKrPrO�ppvr�pvrrrr�default_context_s.



�rhc
Cs|zt|�\}}Wnty}ztd||f��d}~ww|r-|ddkr-td||f��tt�}|r8|�|�t�||�S)z�
    Interpret a marker and return a result depending on environment.

    :param marker: The marker to interpret.
    :type marker: str
    :param execution_context: The context used for name lookup.
    :type execution_context: mapping
    z)Unable to interpret marker syntax: %s: %sNr�#z*unexpected trailing data in marker: %s: %s)r�	Exceptionr3r4�DEFAULT_CONTEXT�update�	evaluatorr7)�marker�execution_contextr9�rest�er:rrrr�s	��
r)r@ra�rer[r]�compatr�utilrrrIrr�__all__�compilerr
r�objectrr^rhrkrmrrrrr�<module>s&

6"