ai6 ddlmZddlmZddlmZddlmZddl m Z m Z ddl m Z ddlmZGd d eZGd d Zd S)) annotations)Iterator)parse_requirement)ParserSyntaxError)Marker_normalize_extra_values) SpecifierSet)canonicalize_nameceZdZdZdS)InvalidRequirementzJ An invalid requirement was found, users should refer to PEP 508. N)__name__ __module__ __qualname____doc__f/home/jenkins/workspace/simtester-sanitize/venv/lib/python3.11/site-packages/packaging/requirements.pyr r srr cBeZdZdZddZdd Zdd Zdd Zdd ZddZ 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_stringstrreturnNonec t|}n/#t$r"}tt||d}~wwxYw|j|_|jpd|_t |jpg|_t|j |_ d|_ |j >tj t|_ t|j |j _dSdSN)_parse_requirementrr rnameurlsetextrasr specifiermarkerr__new__r _markers)selfrparsedes r__init__zRequirement.__init__"s 4'(:;;FF  4 4 4$SVV,,! 3 4  %z1T #FM$7R 8 8 '3F4D'E'E%) = $ .00DK#:6=#I#IDK  % $s >9>r Iterator[str]c#K|V|jr/dt|j}d|dV|jrt |jV|jrd|jV|jrdV|jrd|jVdSdS)N,[]z @  z; )r!joinsortedr"rrr#)r&rformatted_extrass r _iter_partszRequirement._iter_parts1s ; *"xxt{(;(;<< )&))) ) ) ) > &dn%% % % % 8 """ " " "{  ; %$t{$$ $ $ $ $ $ % %rc\d||jS)N)r0r3rr&s r__str__zRequirement.__str__Cs$wwt'' 22333rc(d|jjd|dS)N) __class__rr6s r__repr__zRequirement.__repr__Fs 74>*77d7777rintc tt|t|jSr)hashtupler3r rr6s r__hash__zRequirement.__hash__Is1E$**+rPs#"""""<<<<<<))))))44444444$$$$$$$$$$$$ A A A A A A A A A A r