f ddlmZddlmZmZddlmZddlm Z ddl m Z m Z ddl mZddlmZGd d eZGd d Zy )) annotations)AnyIterator)parse_requirement)ParserSyntaxError)Marker_normalize_extra_values) SpecifierSet)canonicalize_nameceZdZdZy)InvalidRequirementzJ An invalid requirement was found, users should refer to PEP 508. N)__name__ __module__ __qualname____doc___/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/packaging/requirements.pyrrsrrc@eZdZdZd dZd dZd dZd dZd dZd dZ y) RequirementzParse a requirement. Parse a given requirement string into its parts, such as name, specifier, URL, and extras. Raises InvalidRequirement on a badly-formed requirement string. c t|}|j|_|j xsd|_t |jxsg|_t|j|_ d|_ |jCtjt|_ t|j|j_yy#t$r}tt||d}~wwxYwN)_parse_requirementrrstrnameurlsetextrasr specifiermarkerr __new__r _markers)selfrequirement_stringparsedes r__init__zRequirement.__init__"s 4'(:;F  %zz1T #FMM$7R 8 '3F4D4D'E%) == $ ..0DK#:6==#IDKK  %! 4$SV,! 3 4s C C% C  C%c#`K||jr,djt|j}d|d|jrt |j|j r!d|j |j rd|j rd|j yyw)N,[]z@  z; )rjoinsortedr rrr!)r$rformatted_extrass r _iter_partszRequirement._iter_parts1s ;;"xxt{{(;< &'q) ) >>dnn% % 88txxj/ !{{ ;;t{{m$ $ sB,B.cVdj|j|jS)N)r.r1rr$s r__str__zRequirement.__str__Cs wwt'' 233rcd|dS)Nzrr4s r__repr__zRequirement.__repr__FsvS))rct|jjg|jt |j Sr)hash __class__rr1r rr4s r__hash__zRequirement.__hash__Is>'' !!"3DII">?   rc\t|tstSt|jt|jk(xrj|j |j k(xrO|j |j k(xr4|j|jk(xr|j|jk(Sr) isinstancerNotImplementedr rrr rr!)r$others r__eq__zRequirement.__eq__Qs%-! ! dii (,=ejj,I I , u||+ ,%//1 ,EII% , u||+  rN)r%rreturnNone)rrrAz Iterator[str])rAr)rAint)r?rrAbool) rrrrr(r1r5r7r;r@rrrrrs& J%$4*   rrN) __future__rtypingrr_parserrr _tokenizerrmarkersr r specifiersr utilsr ValueErrorrrrrrrMs4# <)4$$ F F r