hf ddlZddlmZmZmZmZddlmZ ddl m Z ddl m Z mZddlmZGdd eZGd d ZdS) N)AnyListOptionalSet)parse_requirement)ParserSyntaxError)Marker_normalize_extra_values) SpecifierSetceZdZdZdS)InvalidRequirementzJ An invalid requirement was found, users should refer to PEP 508. N)__name__ __module__ __qualname____doc__v/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/packaging/requirements.pyrrsrrcVeZdZdZdeddfdZdefdZdefdZdefdZ d e de fd Z dS) 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|}n/#t$r"}tt||d}~wwxYw|j|_|jrt j|j}|j dkr8t j ||jkrtdn3|j r|j r|j s|j std|j|j|_nd|_t|j r|j ng|_ t|j|_d|_|j>t#jt"|_t'|j|j_dSdS)NfilezInvalid URL givenz Invalid URL: )_parse_requirementr rstrnameurlurllibparseurlparsescheme urlunparsenetlocsetextrasr specifiermarkerr __new__r _markers)selfrparsede parsed_urls r__init__zRequirement.__init__!s 4'(:;;FF  4 4 4$SVV,,! 3 4  : ..vz::J F**<**:66&*DD,-@AAAE ' GJ,= G% G.8.? G))E)E)EFFF&,jDHHDH #V]$JFMM K K '3F4D'E'E(, = $ .00DK#:6=#I#IDK  % $s >9>c|jg}|jr@dt|j}|d|d|jr'|t |j|jr9|d|j|jr|d|jr|d|jd|S)N,[]z@  z; ) rr'joinsortedappendr(rrr))r,partsformatted_extrass r__str__zRequirement.__str__;s I; ; 2"xxt{(;(;<<  LL0-000 1 1 1 > . LLT^,, - - - 8 " LLdh ) ) ){ " S!!! ; - LL+dk++ , , ,wwu~~rcd|dS)Nzrr,s r__repr__zRequirement.__repr__Os)))))rcRt|jjt|fSN)hash __class__rrr>s r__hash__zRequirement.__hash__Rs T^,c$ii8999rotherct|tstS|j|jko?|j|jko/|j|jko|j|jko|j|jkSrA) isinstancerNotImplementedrr'r(rr))r,rEs r__eq__zRequirement.__eq__Usu%-- "! ! I # , u|+ ,%/1 ,EI% , u|+  r) rrrrrr0r<r?intrDrboolrIrrrrrsJ3J4JJJJ4(*#****:#::::  C  D       rr) urllib.parser typingrrrr_parserrr _tokenizerr markersr r specifiersr ValueErrorrrrrrrSs ++++++++++++<<<<<<))))))44444444$$$$$$ K K K K K K K K K K r