HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/setuptools/__pycache__/depends.cpython-310.pyc
o

;jM�@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�F/opt/saltstack/salt/lib/python3.10/site-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'�fZ_pZ_i�vrrr �get_version:s

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


r<�javaZcli���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�compileZ
get_module�getattr�extract_constant)r�symbolr'r-r.�pathZ_suffix�_mode�kind�info�codeZimportedrrr r,ss&	�


��
r,rOrrJrcCs�||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�disZopmapZBytecodeZopcode�arg�	co_consts)rOrJr'Zname_idxrPrQrR�constZ	byte_code�oprWrrr rI�s"



rI)r>N)r'r?rr@)r>)rOrrJrr'r?rr@)�
__future__rr9rVrD�sys�typesr�typingrrrZpackaging.versionrrr	r
rrr
r�__all__rr<�platform�
startswithr,rIrrrr �<module>s*O��(�