R" fu ddlmZmZmZmZddlmZddlm Z ddl m Z m Z ddl mZddlmZGdd eZGd d Zy ) )AnyIteratorOptionalSet)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__8/usr/lib/python3/dist-packages/packaging/requirements.pyrrsrrcjeZdZdZdeddfdZdedeefdZdefdZdefd Z de fd Z d e de fd Zy) 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. requirement_stringreturnNc t|}|j|_|j xsd|_t |jxsg|_t|j|_ d|_ |jCtjt|_ t|j|j_yy#t$r}tt||d}~wwxYwN)_parse_requirementr rstrnameurlsetextrasr specifiermarkerr __new__r _markers)selfrparsedes r__init__zRequirement.__init__!s 4'(:;F  "(**"4 #FMM$7R 8 '3F4D4D'E(, == $ ..0DK#:6==#IDKK  %! 4$SV,! 3 4s C C% C  C%rc#`K||jr,djt|j}d|d|jrt |j|j r!d|j |j rd|j rd|j yyw)N,[]z@  z; )r"joinsortedr#rr r$)r'rformatted_extrass r _iter_partszRequirement._iter_parts0s ;;"xxt{{(;< &'q) ) >>dnn% % 88txxj/ !{{ ;;t{{m$ $ sB,B.cVdj|j|jS)N)r0r3rr's r__str__zRequirement.__str__Bs wwt'' 233rcd|dS)Nzrr6s r__repr__zRequirement.__repr__EsvS))rct|jjg|jt |j Sr)hash __class__rr3r rr6s r__hash__zRequirement.__hash__Hs>'' !!"3DII">?   rotherc\t|tstSt|jt|jk(xrj|j |j k(xrO|j |j k(xr4|j|jk(xr|j|jk(Sr) isinstancerNotImplementedr rr"r#r r$)r'r>s r__eq__zRequirement.__eq__Ps%-! ! dii (,=ejj,I I , u||+ ,%//1 ,EII% , u||+  r)rrrrrr*rr3r7r9intr=rboolrBrrrrrsk J3 J4 J%% %$44*#* #   C  D  rrN)typingrrrr_parserrr _tokenizerr markersr r specifiersr utilsr ValueErrorrrrrrrLs4 0/<)4$$ F F r