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/lib/python3.10/dist-packages/setuptools/__pycache__/depends.cpython-310.pyc
o

��hM�@s�ddlmZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZddlm
Z
ddlmZddlmZmZmZmZed	�Zd
dgZGdd
�d
�Zd
d�Zej�d�srejdkrt	dddd�Z	d d!dd�Zeddg7ZdSdSdS)"�)�annotationsN)�CodeType)�Any�Literal�TypeVar)�Version�)�_imp)�PY_COMPILED�	PY_FROZEN�	PY_SOURCE�find_module�_T�Requirer
c@sTeZdZdZ			dddd	�Zd
d�Zdd
�Z	dddd�Zddd�Zddd�Z	dS)rz7A prerequisite to building or installing a distribution�N�homepage�str�return�NonecCsF|dur
|dur
t}|dur||�}|durd}|j�t��|`dS)N�__version__)r�__dict__�update�locals�self)r�name�requested_version�moduler�	attribute�format�r�=/usr/local/lib/python3.10/dist-packages/setuptools/depends.py�__init__s	zRequire.__init__cCs"|jdur|j�d|j��S|jS)z0Return full package/distribution name, w/versionN�-)rr)rrrr �	full_name+s
zRequire.full_namecCs0|jdup|jdupt|�dko|�|�|jkS)z%Is 'version' sufficiently up-to-date?N�unknown)rrrr)r�versionrrr �
version_ok1s
��zRequire.version_okr$�default�_T | Literal['unknown']�$_T | Literal['unknown'] | None | AnycCs�|jdur#zt|j|�\}}}Wn
tyYdSw|r!|��|St|j|j||�}|dur>||ur>|jdur>|�|�S|S)a�Get version number of installed module, 'None', or 'default'

        Search 'paths' for module.  If not found, return 'None'.  If found,
        return the extracted version attribute, or 'default' if no version
        attribute was specified, or the value cannot be determined without
        importing the module.  The version is formatted according to the
        requirement's version format (if any), unless it is 'None' or the
        supplied 'default'.
        N)rr
r�ImportError�close�get_module_constantr)r�pathsr'�f�_p�_i�vrrr �get_version:s

�
zRequire.get_versioncCs|�|�duS)z/Return true if dependency is present on 'paths'N)r2)rr-rrr �
is_presentWszRequire.is_presentcCs$|�|�}|durdS|�t|��S)z>Return true if dependency is present and up-to-date on 'paths'NF)r2r&r)rr-r%rrr �
is_current[s
zRequire.is_current)rNN)rrrr)Nr$)r'r(rr)�N)
�__name__�
__module__�__qualname__�__doc__r!r#r&r2r3r4rrrr rs�
�
cCs"tjdd��}|s|�St�|�S)Ncss�dVdSr5rrrrr �emptyds�zmaybe_close.<locals>.empty)�
contextlib�contextmanager�closing)r.r:rrr �maybe_closecs


r>�java�cli���r'�_T | intr�_T | int | None | AnycCs�zt||�\}}\}}}}	Wn
tyYdSwt|��C|tkr.|�d�t�|�}
n,|tkr9t�	||�}
n!|t
krFt|��|d�}
nt�|||	�}t
||d�Wd�SWd�n1sdwYt|
||�S)aFind 'module' by searching 'paths', and extract 'symbol'

        Return 'None' if 'module' does not exist on 'paths', or it does not define
        'symbol'.  If the module defines 'symbol' as a constant, return the
        constant.  Otherwise, return 'default'.N��exec)r
r*r>r
�read�marshal�loadrr	�get_frozen_objectr�compile�
get_module�getattr�extract_constant)r�symbolr'r-r.�path�_suffix�_mode�kind�info�code�importedrrr r,ss&	�


��
r,rTrrNrcCs�||jvrdSt|j��|�}tjd}tjd}tjd}|}t�|�D]*}|j}	|j}
|	|kr=|
dus7J�|j|
}q%|
|krM|	|ksI|	|krM|S|}q%dS)a/Extract the constant value of 'symbol' from 'code'

        If the name 'symbol' is bound to a constant value by the Python code
        object 'code', return that value.  If 'symbol' is bound to an expression,
        return 'default'.  Otherwise, return 'None'.

        Return value is based on the first assignment to 'symbol'.  'symbol' must
        be a global, or at least a non-"fast" local in the code block.  That is,
        only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol'
        must be present in 'code.co_names'.
        N�
STORE_NAME�STORE_GLOBAL�
LOAD_CONST)	�co_names�list�index�dis�opmap�Bytecode�opcode�arg�	co_consts)rTrNr'�name_idxrVrWrX�const�	byte_code�opr`rrr rM�s"



rM)rAN)r'rBrrC)rA)rTrrNrr'rBrrC)�
__future__rr;r\rG�sys�typesr�typingrrr�packaging.versionrrr	r
rrr
r�__all__rr>�platform�
startswithr,rMrrrr �<module>s*O��(�