bgS8ddlmZddlZddlZddlZddlZddlmZddlm Z m Z m Z ddl m Z ddlmZddlmZmZmZmZe d Zd d gZGd d Zd Zejds ejdkr dddZ dd dZeddgz ZdSdSdS)!) annotationsN)CodeType)AnyLiteralTypeVar)Version)_imp) PY_COMPILED PY_FROZEN PY_SOURCE find_module_TRequirercJeZdZdZ dddZd Zd Z dddZddZddZ dS)rz7A prerequisite to building or installing a distributionNhomepagestrreturnNonec| |t}|||}|d}|jt|`dS)N __version__)r__dict__updatelocalsself)rnamerequested_versionmoduler attributeformats I/opt/cloudlinux/venv/lib64/python3.11/site-packages/setuptools/depends.py__init__zRequire.__init__sY >/;F   &'8 9 9  )  VXX&&& IIIc@|j|jd|jS|jS)z0Return full package/distribution name, w/versionN-)rr)rs r" full_namezRequire.full_name+s*  ! -"iii)?)?@ @yr$c|jdup9|jdup0t|dko|||jkS)z%Is 'version' sufficiently up-to-date?Nunknown)r r!rr)rversions r" version_okzRequire.version_ok1sQ Nd " ?{d" ?7||y(? G$$(>>  r$r)default_T | Literal['unknown']$_T | Literal['unknown'] | None | Anyc|jD t|j|\}}}n#t$rYdSwxYw|r||St |j|j||}| ||ur|j||S|S)aGet 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)r rr ImportErrorcloseget_module_constantr!)rpathsr,f_p_ivs r" get_versionzRequire.get_version:s > ! ' U;; 2rr   tt   N  T^We L L =Qg--$+2I;;q>> !s # 11c0||duS)z/Return true if dependency is present on 'paths'N)r8)rr3s r" is_presentzRequire.is_presentWs&&d22r$cx||}|dS|t|S)z>Return true if dependency is present and up-to-date on 'paths'NF)r8r+r)rr3r*s r" is_currentzRequire.is_current[s7""5)) ?5s7||,,,r$)rNN)rrrr)Nr))r,r-rr.N) __name__ __module__ __qualname____doc__r#r'r+r8r:r<r$r"rrsAA(    >G:3333------r$cltjd}|s |Stj|S)Nc3KdVdSr=rBrBr$r"emptyzmaybe_close..emptyds r$) contextlibcontextmanagerclosing)r4rEs r" maybe_closerIcsE uww  a  r$javaclir,_T | intr_T | int | None | Anyc< t||x\}}\}}}} n#t$rYdSwxYwt|5|tkr*|dt j|} n|tkrtj ||} nb|tkr$t||d} n3tj ||| } t| |dcdddSdddn #1swxYwYt| ||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'.Nexec)rr0rIr readmarshalloadr r get_frozen_objectr compile get_modulegetattrextract_constant) rsymbolr,r3r4path_suffix_modekindinfocodeimporteds r"r2r2ss~ 5@5O5O O +At+guddd   44 ^^ 7 7{""q |A""-fe<<""qvvxxv66 ?65$??x66 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 fg666s ++B,DD Dr`rrZrc||jvrdSt|j|}tjd}tjd}tjd}|}tj|D]@}|j} |j} | |kr| J|j| }(| |kr| |ks| |kr|cS|}AdS)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_nameslistindexdisopmapBytecodeopcodearg co_consts) r`rZr,name_idxrcrdreconst byte_codeoprms r"rYrYs  & &4 &&,,V44Y|, y0 Y|, d++ I!B-CZs+bJ&6&6" :L:L tr$r2rY)rLN)r,rMrrN)rL)r`rrZrr,rMrrN) __future__rrFrirSsystypesrtypingrrrpackaging.versionrrr r r r rr__all__rrIplatform startswithr2rYrBr$r"r{s""""""  ((((((((((%%%%%%@@@@@@@@@@@@ WT]] m $L-L-L-L-L-L-L-L-^ ! ! ! |v&&H;3<5+@+@7;77777>:<&&&&&P %'9::GGGQH;H;+@+@r$