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: //home/arjun/.local/lib/python3.10/site-packages/packaging/__pycache__/markers.cpython-310.pyc
o

���gA)�	@s�UddlmZddlZddlZddlZddlZddlmZmZm	Z	m
Z
ddlmZm
Z
mZmZmZddlmZddlmZddlmZmZdd	lmZgd
�ZeeegefZGdd�de�ZGd
d�de�Z Gdd�de�Z!Gdd�de	�Z"dCdd�Z#	dDdEdd�Z$d d!�d"d!�ej%ej&ej'ej(ej)ej*d#�Z+d$e,d%<dFd+d,�Z-dGd0d1�Z.dHd6d7�Z/dId:d;�Z0dJd<d=�Z1Gd>d?�d?�Z2dKdAdB�Z3dS)L�)�annotationsN)�Any�Callable�	TypedDict�cast�)�
MarkerAtom�
MarkerList�Op�Value�Variable)�parse_marker)�ParserSyntaxError)�InvalidSpecifier�	Specifier��canonicalize_name)�
InvalidMarker�Marker�UndefinedComparison�UndefinedEnvironmentName�default_environmentc@�eZdZdZdS)rzE
    An invalid marker was found, users should refer to PEP 508.
    N��__name__�
__module__�__qualname__�__doc__�rr�D/home/arjun/.local/lib/python3.10/site-packages/packaging/markers.pyr�rc@r)rzP
    An invalid operation was attempted on a value that doesn't support it.
    Nrrrrrr$r rc@r)rz\
    A name was attempted to be used that does not exist inside of the
    environment.
    Nrrrrrr*r rc@szeZdZUded<	ded<	ded<	ded<	ded<	ded<	ded<	ded	<	ded
<	ded<	ded<d
S)�Environment�str�implementation_name�implementation_version�os_name�platform_machine�platform_release�platform_system�platform_version�python_full_version�platform_python_implementation�python_version�sys_platformN)rrr�__annotations__rrrrr!1s.
r!�resultsr�returncCs|t|dt�r<|d\}}}t|t�r"|jdkr"t|j�}t|�}nt|t�r5|jdkr5t|j�}t|�}|||f|d<|S)z!
    Normalize extra values.
    r�extra)�
isinstance�tupler�valuerr)r/�lhs�op�rhs�normalized_extrarrr�_normalize_extra_valuesys


r9T�marker�list[str] | MarkerAtom | str�first�bool | Noner"cCs�t|tttf�s
J�t|t�r$t|�dkr$t|dttf�r$t|d�St|t�r@dd�|D�}|r7d�|�Sdd�|�dSt|t�rOd�dd	�|D��S|S)
Nrrcss�|]	}t|dd�VqdS)F)r<N)�_format_marker��.0�mrrr�	<genexpr>�s�z!_format_marker.<locals>.<genexpr>� �(�)cSsg|]}|���qSr)�	serializer?rrr�
<listcomp>�sz"_format_marker.<locals>.<listcomp>)r2�listr3r"�lenr>�join)r:r<�innerrrrr>�s��


r>cCs||vS�Nr�r5r7rrr�<lambda>��rNcCs||vSrLrrMrrrrN�rO)�inznot in�<z<=z==z!=z>=�>zdict[str, Operator]�
_operatorsr5r6r
r7�boolcCsxz
td�|��|g��}Wn	tyYnw|j|dd�St�|���}|dur7td|�d|�d|�d���|||�S)N�T)�prereleasesz
Undefined z on z and �.)rrJrFr�containsrS�getr)r5r6r7�spec�operrrr�_eval_op�s�
r\�values�key�tuple[str, ...]cGs|dkr
tdd�|D��S|S)Nr1cs��|]}t|�VqdSrLr)r@�vrrrrB���z_normalize.<locals>.<genexpr>)r3)r^r]rrr�
_normalize�src�markersr	�environment�dict[str, str]c
Cs�gg}|D]d}t|tttf�sJ�t|t�r!|d�t||��qt|t�rZ|\}}}t|t�r;|j}||}|j}	n
|j}|j}||}	t||	|d�\}}	|d�t	|||	��q|dvs`J�|dkri|�g�qt
dd�|D��S)N���)r^)�and�orricsr`rL)�all)r@�itemrrrrB�rbz$_evaluate_markers.<locals>.<genexpr>)r2rHr3r"�append�_evaluate_markersrr4rcr\�any)
rdre�groupsr:r5r6r7�environment_key�	lhs_value�	rhs_valuerrrrm�s*




�rm�info�sys._version_infocCsB|j�d|j�d|j��}|j}|dkr||dt|j�7}|S)NrW�finalr)�major�minor�micro�releaselevelr"�serial)rs�version�kindrrr�format_full_version�s
r}cCs^ttjj�}tjj}||tjt��t��t�	�t��t�
�t��d�t�
�dd��tjd�S)NrW�)r#r$r%r&r'r(r)r*r+r,r-)r}�sys�implementationr{�name�os�platform�machine�release�systemr,�python_implementationrJ�python_version_tuple)�iverr#rrrr�s�rc@sJeZdZddd�Zddd�Zdd	d
�Zddd
�Zddd�Zdddd�ZdS)rr:r"r0�Nonec
Cs<z
tt|��|_WdSty}ztt|��|�d}~wwrL)r9�
_parse_marker�_markersrrr")�selfr:�errr�__init__s��zMarker.__init__cCs
t|j�SrL)r>r��r�rrr�__str__s
zMarker.__str__cCsd|�d�S)Nz	<Marker('z')>rr�rrr�__repr__!szMarker.__repr__�intcCst|jjt|�f�SrL)�hash�	__class__rr"r�rrr�__hash__$szMarker.__hash__�otherrrTcCst|t�stSt|�t|�kSrL)r2r�NotImplementedr")r�r�rrr�__eq__'s
z
Marker.__eq__Nre�dict[str, str] | NonecCsJtdt��}d|d<|dur|�|�|ddurd|d<t|jt|��S)a$Evaluate a marker.

        Return the boolean from evaluating the given marker against the
        environment. environment is an optional argument to override all or
        part of the determined environment.

        The environment is determined from the current Python process.
        rfrUr1N)rr�updatermr��_repair_python_full_version)r�re�current_environmentrrr�evaluate-s	

�zMarker.evaluate)r:r"r0r�)r0r")r0r�)r�rr0rTrL)rer�r0rT)	rrrr�r�r�r�r�r�rrrrrs




r�envcCs"|d�d�r|dd7<|S)z�
    Work around platform.python_version() returning something that is not PEP 440
    compliant for non-tagged Python builds.
    r*�+�local)�endswith)r�rrrr�Dsr�)r/rr0r)T)r:r;r<r=r0r")r5r"r6r
r7r"r0rT)r]r"r^r"r0r_)rdr	rerfr0rT)rsrtr0r")r0r!)r�rfr0rf)4�
__future__r�operatorr�r�r�typingrrrr�_parserrr	r
rrr
r��
_tokenizerr�
specifiersrr�utilsr�__all__r"rT�Operator�
ValueErrorrrrr!r9r>�lt�le�eq�ne�ge�gtrSr.r\rcrmr}rrr�rrrr�<module>sH
H��




@