HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberPanel/lib64/python3.10/site-packages/packaging/__pycache__/markers.cpython-310.pyc
o

h�h/�	@s�UddlmZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZm
Z
ddlmZmZmZmZmZddlmZddlmZddlmZmZdd	lmZgd
�Ze	eeeeefgefZ e
dZ!dd
hZ"Gdd�de#�Z$Gdd�de#�Z%Gdd�de#�Z&Gdd�de�Z'dFdd�Z(	dGdHd!d"�Z)d#d$�d%d$�ej*ej+ej,ej-ej.ej/d&�Z0d'e1d(<dId/d0�Z2dJd3d4�Z3dKd9d:�Z4dLd=d>�Z5dMd?d@�Z6GdAdB�dB�Z7dNdDdE�Z8dS)O�)�annotationsN)�AbstractSet�Any�Callable�Literal�	TypedDict�Union�cast�)�
MarkerAtom�
MarkerList�Op�Value�Variable)�parse_marker)�ParserSyntaxError)�InvalidSpecifier�	Specifier��canonicalize_name)�EvaluateContext�
InvalidMarker�Marker�UndefinedComparison�UndefinedEnvironmentName�default_environment)�metadata�	lock_file�requirement�extras�dependency_groupsc@�eZdZdZdS)rzE
    An invalid marker was found, users should refer to PEP 508.
    N��__name__�
__module__�__qualname__�__doc__�r'r'�G/usr/local/CyberPanel/lib/python3.10/site-packages/packaging/markers.pyr!�rc@r!)rzP
    An invalid operation was attempted on a value that doesn't support it.
    Nr"r'r'r'r(r'r)rc@r!)rz\
    A name was attempted to be used that does not exist inside of the
    environment.
    Nr"r'r'r'r(r-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)r#r$r%�__annotations__r'r'r'r(r*4s.
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)r8�lhs�op�rhs�normalized_extrar'r'r(�_normalize_extra_values|s


rBT�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)
Nr
rcss�|]	}t|dd�VqdS)F)rEN)�_format_marker��.0�mr'r'r(�	<genexpr>�s�z!_format_marker.<locals>.<genexpr>� �(�)cSsg|]}|���qSr')�	serializerHr'r'r(�
<listcomp>��z"_format_marker.<locals>.<listcomp>)r;�listr<r+�lenrG�join)rCrE�innerr'r'r(rG�s��


rGcCs||vS�Nr'�r>r@r'r'r(�<lambda>��rXcCs||vSrVr'rWr'r'r(rX�rY)�inznot in�<z<=z==z!=z>=�>zdict[str, Operator]�
_operatorsr>r?r
r@�str | AbstractSet[str]�boolcCs�t|t�r#z
td�|��|g��}Wn	tyYnw|j|dd�St�|���}|dur<t	d|�d|�d|�d���|||�S)N�T)�prereleasesz
Undefined z on z and �.)
r;r+rrTrOr�containsr]�getr)r>r?r@�spec�operr'r'r(�_eval_op�s
�
rg�key�"tuple[str, str | AbstractSet[str]]cCsj|dkrt|t�s
Jd��t|�t|�fS|tvr1t|t�r&t|�t|�fSt|�dd�|D�fS||fS)Nr:zextra value must be a stringcSsh|]}t|��qSr'r)rI�vr'r'r(�	<setcomp>�rQz_normalize.<locals>.<setcomp>)r;r+r�MARKERS_ALLOWING_SET)r>r@rhr'r'r(�
_normalize�s
rm�markersr�environment�!dict[str, str | AbstractSet[str]]c
Cs�gg}|D]m}t|tttf�sJ�t|t�r!|d�t||��qt|t�rc|\}}}t|t�r;|j}||}|j}	n
|j}|j}||}	t|t�sNJd��t||	|d�\}}	|d�t	|||	��q|dvsiJ�|dkrr|�g�qt
dd�|D��S)N���zlhs must be a string)rh)�and�orrscss�|]}t|�VqdSrV)�all)rI�itemr'r'r(rK�s�z$_evaluate_markers.<locals>.<genexpr>)r;rRr<r+�append�_evaluate_markersrr=rmrg�any)
rnro�groupsrCr>r?r@�environment_key�	lhs_value�	rhs_valuer'r'r(rw�s,




�rw�info�sys._version_infocCsB|j�d|j�d|j��}|j}|dkr||dt|j�7}|S)Nrb�finalr)�major�minor�micro�releaselevelr+�serial)r}�version�kindr'r'r(�format_full_version�s
r�cCs^ttjj�}tjj}||tjt��t��t�	�t��t�
�t��d�t�
�dd��tjd�S)Nrb�)r,r-r.r/r0r1r2r3r4r5r6)r��sys�implementationr��name�os�platform�machine�release�systemr5�python_implementationrT�python_version_tuple)�iverr,r'r'r(rs�rc@sNeZdZddd�Zddd�Zdd	d
�Zddd
�Zddd�Z		dd dd�ZdS)!rrCr+r9�Nonec
Cs<z
tt|��|_WdSty}ztt|��|�d}~wwrV)rB�
_parse_marker�_markersrrr+)�selfrC�er'r'r(�__init__s��zMarker.__init__cCs
t|j�SrV)rGr��r�r'r'r(�__str__,s
zMarker.__str__cCsd|�d�S)Nz	<Marker('z')>r'r�r'r'r(�__repr__/szMarker.__repr__�intcCst|jjt|�f�SrV)�hash�	__class__r#r+r�r'r'r(�__hash__2szMarker.__hash__�otherrr_cCst|t�stSt|�t|�kSrV)r;r�NotImplementedr+)r�r�r'r'r(�__eq__5s
z
Marker.__eq__Nrro�dict[str, str] | None�contextrcCsvtdt��}|dkr|jt�t�d�n|dkrd|d<|dur3|�|�d|vr3|ddur3d|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 *context* parameter specifies what
        context the markers are being evaluated for, which influences what markers
        are considered valid. Acceptable values are "metadata" (for core metadata;
        default), "lock_file", and "requirement" (i.e. all other situations).

        The environment is determined from the current Python process.
        rpr)rr rr`r:N)r	r�update�	frozensetrwr��_repair_python_full_version)r�ror��current_environmentr'r'r(�evaluate;s ��

�zMarker.evaluate)rCr+r9r�)r9r+)r9r�)r�rr9r_)Nr)ror�r�rr9r_)	r#r$r%r�r�r�r�r�r�r'r'r'r(rs




�r�envcCs*tt|d�}|�d�r|�d�|d<|S)z�
    Work around platform.python_version() returning something that is not PEP 440
    compliant for non-tagged Python builds.
    r3�+�local)r	r+�endswith)r�r3r'r'r(r�`s
r�)r8rr9r)T)rCrDrErFr9r+)r>r+r?r
r@r^r9r_)r>r+r@r^rhr+r9ri)rnrrorpr9r_)r}r~r9r+)r9r*)r�rpr9rp)9�
__future__r�operatorr�r�r��typingrrrrrrr	�_parserrrr
rrrr��
_tokenizerr�
specifiersrr�utilsr�__all__r+r_�Operatorrrl�
ValueErrorrrrr*rBrG�lt�le�eq�ne�ge�gtr]r7rgrmrwr�rrr�r'r'r'r(�<module>sL$	
H��



 
N