efddlZddlZddlZddlZddlmZddlmZmZmZm Z ddl m Z gdZ GddZ d Zdd Zdd Zd ZedS)N)_imp) find_module PY_COMPILED PY_FROZEN PY_SOURCE)Version)Requirerget_module_constantextract_constantc@eZdZdZ d dZdZdZd dZd d Zd d Z dS)r z7A prerequisite to building or installing a distributionNc| |t}|||}|d}|jt|`dS)N __version__)r __dict__updatelocalsself)rnamerequested_versionmodulehomepage attributeformats r/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/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)?)?@ @yrc|jdup9|jdup0t|dko|||jkS)z%Is 'version' sufficiently up-to-date?Nunknown)rrstrr)rversions r version_okzRequire.version_ok&sQ Nd " ?{d" ?7||y(? G$$(>>  rr"c|jC t|j|\}}}|r||S#t$rYdSwxYwt |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)rrrclose ImportErrorr r)rpathsdefaultfpivs r get_versionzRequire.get_version/s > ! %dk5991aGGIII   tt   T^We L L =Qg--$+2I;;q>> !s0: AAc0||duS)z/Return true if dependency is present on 'paths'N)r/)rr)s r is_presentzRequire.is_presentJs&&d22rcx||}|dS|t|S)z>Return true if dependency is present and up-to-date on 'paths'NF)r/r%r#)rr)r$s r is_currentzRequire.is_currentNs7""5)) ?5s7||,,,r)rNN)Nr"N) __name__ __module__ __qualname____doc__rr r%r/r1r3rrr r sAATX        63333------rr cltjd}|s |Stj|S)Nc3KdVdSr4r9r9rremptyzmaybe_close..emptyWs r) contextlibcontextmanagerclosing)r+r<s r maybe_closer@VsE uww  a  rc< t||x\}}\}}}} n#t$rYdSwxYwt|5|tkr*|dt j|} n|tkrtj ||} nb|tkr$t||d} n3tj ||| } t| |dcdddSdddn #1swxYwYt| ||S)zFind '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)rr(r@rreadmarshalloadrrget_frozen_objectrcompile get_modulegetattrr ) rsymbolr*r)r+pathsuffixmodekindinfocodeimporteds rr r bs~/:65/I/II%4%&$ tt Q 3 3 ;   FF1III<??DD Y  )&%88DD Y  16688T622DDvud;;H8VT22 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 D&' 2 22s ++B,DD Dc|||jvrdSt|j|}tjd}tjd}tjd}|}tj|D]<}|j} |j} | |kr|j| }$| |kr| |ks| |kr|cS|}=dS)aExtract 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) rRrLr*name_idxrUrVrWconst byte_codeopr_s rr r sT]""tDM""((00H<(J9^,L<(J E\$''    m   N3'EE H__" "2"2bL6H6HLLLEE  rctjdstjdkrdSd}|D]+}t|=t|,dS)z Patch the globals to remove the objects not available on some platforms. XXX it'd be better to test assertions about bytecode instead. javacliN)r r )sysplatform startswithglobals__all__remove) incompatiblers r_update_globalsrosk < " "6 * *s|u/D/Drqs  @@@@@@@@@@@@------ P O OD-D-D-D-D-D-D-D-N ! ! !3333:!!!!H   r