U Qab@srddlmZmZmZddlZddlZddlmZmZm Z m Z ddlm Z m Z m Z mZmZddlmZddlmZddlmZmZdd lmZmZmZGd d d eZe ejejZ ed !Z"ed !Z#ed!Z$ed!Z%ed!Z&ed!Z'ed!Z(e dZ)e e e)e BZ*ee e e*Z+e+dZ,e+Z-eddZ.e(e.Z/e-e e&e-Z0e"e e0e#dZ1eej2ej3ej4BZ5eej2ej3ej4BZ6e5e6AZ7ee7e e&e7ddddZ8e e$e8e%e8BZ9e9:dde e9dZ;e;:dde edZe:d de'Ze/e e=Z?e,e e1e?e>BZ@ee@eZAGd!d"d"eBZCdS)#)absolute_importdivisionprint_functionN) stringStart stringEndoriginalTextForParseException) ZeroOrMoreWordOptionalRegexCombine)Literal)parse) MARKER_EXPRMarker)LegacySpecifier Specifier SpecifierSetc@seZdZdZdS)InvalidRequirementzJ An invalid requirement was found, users should refer to PEP 508. N)__name__ __module__ __qualname____doc__rrP/usr/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/requirements.pyrsr[](),;@z-_.namez[^ ]+urlextrasF)Z joinStringZadjacent _raw_speccCs |jpdS)N)r'sltrrr6r- specifiercCs|dS)Nrrr)rrrr-9r.markercCst||j|jS)N)rZ_original_startZ _original_endr)rrrr-=r.c@s(eZdZdZddZddZddZdS) 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 Cszt|}Wn@tk rN}z"td||j|jdW5d}~XYnX|j|_|jrt|j}|j r|j r|j s|j std|j|_nd|_t |j r|j ng|_ t|j|_|jr|jnd|_dS)Nz+Invalid requirement, parse error at "{0!r}"zInvalid URL given) REQUIREMENTZ parseStringrrformatZlocr$r%urlparseZschemeZnetlocsetr&ZasListrr/r0)selfZrequirement_stringZreqeZ parsed_urlrrr__init__Xs,    zRequirement.__init__cCsz|jg}|jr*|ddt|j|jr@|t|j|jrX|d|j|j rp|d|j d|S)Nz[{0}]r!z@ {0}z; {0}r() r$r&appendr4joinsortedr/strr%r0)r7partsrrr__str__mszRequirement.__str__cCsdt|S)Nz)r4r=)r7rrr__repr__~szRequirement.__repr__N)rrrrr9r?r@rrrrr1Ks r1)DZ __future__rrrstringreZpkg_resources.extern.pyparsingrrrrr r r r r rLZ%pkg_resources.extern.six.moves.urllibrr5ZmarkersrrZ specifiersrrr ValueErrorrZ ascii_lettersZdigitsZALPHANUMsuppressZLBRACKETZRBRACKETZLPARENZRPARENCOMMAZ SEMICOLONATZ PUNCTUATIONZIDENTIFIER_ENDZ IDENTIFIERNAMEZEXTRAZURIZURLZ EXTRAS_LISTZEXTRASZ _regex_strVERBOSE IGNORECASEZVERSION_PEP440ZVERSION_LEGACYZ VERSION_ONEZ VERSION_MANYZ _VERSION_SPECZsetParseActionZ VERSION_SPECZMARKER_SEPERATORZMARKERZVERSION_AND_MARKERZURL_AND_MARKERZNAMED_REQUIREMENTr3objectr1rrrrsf