HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //proc/self/root/usr/share/dh-python/dhpython/__pycache__/markers.cpython-310.pyc
o

O�Ib��@sDdZddlZe�dej�Ze�dej�ZGdd�de�Zdd�ZdS)	z�
Handle Environment Markers
https://www.python.org/dev/peps/pep-0508/#environment-markers

TODO: Ideally replace with the packaging library, but the API is currently
private: https://github.com/pypa/packaging/issues/496
�Nz�
    (?P<marker>[a-z_]+)
    \s*
    (?P<op><=?|>=?|[=!~]=|===)
    \s*
    (?P<quote>['"])
    (?P<value>.*)  # Could contain additional markers
    (?P=quote)
    z0
    (?:\s|\))
    (?:and|or)
    (?:\s|\()
    c@seZdZdS)�ComplexEnvironmentMarkerN)�__name__�
__module__�__qualname__�rr�(/usr/share/dh-python/dhpython/markers.pyr0srcCsp|��}|�d�r|�d�r|dd���}t�|�}|r t��t�|�}|s*t��|�d�|�d�|�d�fS)z5Parse a simple marker of <= 1 environment restriction�(�)�����marker�op�value)	�strip�
startswith�endswith�COMPLEX_ENV_MARKER_RE�searchr�SIMPLE_ENV_MARKER_RE�match�group)r�mrrr�parse_environment_marker4s

�r)	�__doc__�re�compile�VERBOSErr�	Exceptionrrrrrr�<module>s�	�