a if @s~ddlmZddlmZmZddlmZddlm Z ddl m Z m Z ddl mZddlmZGd d d eZGd d d Zd S)) annotations)AnyIterator)parse_requirement)ParserSyntaxError)Marker_normalize_extra_values) SpecifierSet)canonicalize_namec@seZdZdZdS)InvalidRequirementzJ An invalid requirement was found, users should refer to PEP 508. N)__name__ __module__ __qualname____doc__rrz/sparta/input/_build_configuration/image_build+validate/lib/bmcenv/lib64/python3.9/site-packages/packaging/requirements.pyr sr c@sjeZdZdZdddddZdddd d Zdd d d Zdd ddZdd ddZdddddZ 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. strNone)requirement_stringreturnc Csz t|}Wn2ty>}ztt||WYd}~n d}~00|j|_|jpPd|_t|jp^g|_t|j |_ d|_ |j durt t |_ t |j |j _dSN)_parse_requirementrr rnameurlsetextrasr specifiermarkerr__new__r _markers)selfrparsederrr__init__"s $    zRequirement.__init__z Iterator[str])rrccst|V|jr*dt|j}d|dV|jrrr/rrr__repr__FszRequirement.__repr__intcCs t|jjg|t|jRSr)hash __class__r r-r rr/rrr__hash__Is zRequirement.__hash__rbool)otherrcCsRt|tstSt|jt|jkoP|j|jkoP|j|jkoP|j|jkoP|j|jkSr) isinstancerNotImplementedr rrrrr)r"r7rrr__eq__Qs     zRequirement.__eq__N) r rrrr%r-r0r1r5r:rrrrrs rN) __future__rtypingrr_parserrr _tokenizerrmarkersrr specifiersr utilsr ValueErrorr rrrrrs