~fddlZddlZddlZddlZddlmZddlmZmZmZm Z ddl m Z ddgZ GddZ d Zejj!d s ejd k7rdd Zdd Ze ddgz Z yyy)N)_imp) find_module PY_COMPILED PY_FROZEN PY_SOURCE)VersionRequirerc>eZdZdZ d dZdZdZd dZd dZd dZ y) r z7A prerequisite to building or installing a distributionNc~||t}| ||}|d}|jjt|`y)N __version__)r __dict__updatelocalsself)rnamerequested_versionmodulehomepage attributeformats [/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/setuptools/depends.py__init__zRequire.__init__sJ >/;F   &'8 9  )  VX& Ich|j|jd|jS|jS)z0Return full package/distribution name, w/version-)rr)rs r full_namezRequire.full_name s-  ! ! -"ii)?)?@ @yyrc|jduxs>|jduxs.t|dk7xr|j||jk\S)z%Is 'version' sufficiently up-to-date?Nunknown)rrstrr)rversions r version_okzRequire.version_ok&sS NNd " ?{{d" ?7|y(? G$(>(>>  rc$|j/ t|j|\}}}|r|j |St |j|j||}|!||ur|j |j |S|S#t$rYywxYw)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)rrr ImportErrorcloseget_module_constantr)rpathsdefaultfpivs r get_versionzRequire.get_version/s >> ! %dkk591a N  T^^We L =Qg-$++2I;;q> !  sB BBc(|j|duS)z/Return true if dependency is present on 'paths'N)r-)rr's r is_presentzRequire.is_presentJs&d22rc^|j|}|y|jt|S)z>Return true if dependency is present and up-to-date on 'paths'F)r-r"r )rr'r!s r is_currentzRequire.is_currentNs-""5) ?s7|,,r)NN)NrN) __name__ __module__ __qualname____doc__rrr"r-r/r1rrr r s*ATX   63-rcjtjd}|s|Stj|S)Nc3Kdywr3r8r8rremptyzmaybe_close..emptyWs  s) contextlibcontextmanagerclosing)r)r;s r maybe_closer?Vs7 w   a  rjavaclic t||x\}}\}}}} t|5|tk(r'|j dt j |} nr|tk(rtj||} nR|tk(rt|j |d} n-tj||| } t| |dcdddSdddt ||S#t$rYywxYw#1swY%xYw)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)rr$r?rreadmarshalloadrrget_frozen_objectrcompile get_modulegetattrextract_constant) rsymbolr(r'r)pathsuffixmodekindinfocodeimporteds rr&r&fs 3>vu3M M )At)fdDD ^ 7{"q ||A"--fe<"qvvxv6 ??65$?x6 7 7 7 fg66#   7 7sCBC* C'&C'*C3c||jvryt|jj|}tjd}tjd}tjd}|}tj |D]D}|j } |j} | |k(r|j| }0| |k(r| |k(s| |k(r|cS|}Fy)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) rSrMr(name_idxrVrWrXconst byte_codeopr`s rrLrLs  & &,,V4YY|, yy0 YY|, d+I!!B--CZs+bJ&6" :L ,rr&rL)N)rf)sysrFr<r\r2rrrrrextern.packaging.versionr __all__r r?platform startswithr&rLr8rrrls  @@- m $D-D-N ! ||v&3<<5+@78#J %'9::GG,A&r