U .e\@s|ddlmZmZmZddlZddlZddlmZmZm 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@eZAeABd!Gd"d#d#eCZDdS)$)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__rrF/usr/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.pyrsr[](),;@z-_.namez[^ ]+urlextrasF)Z joinStringZadjacent _raw_speccCs |jpdS)N)r'sltrrr7r- specifiercCs|dS)Nrrr)rrrr-:r.markercCst||j|jS)N)rZ_original_startZ _original_endr)rrrr->r.zx[]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|}WnDtk rR}z&td||j|jd|jW5d}~XYnX|j|_|jrt |j}|j dkrt ||jkrtdn(|j r|j r|j s|j std|j|j|_nd|_t |jr|jng|_t|j|_|jr|jnd|_dS)NzParse error at "{0!r}": {1}filezInvalid URL givenzInvalid URL: {0}) REQUIREMENT parseStringrrformatZlocmsgr$r%urlparseZschemeZ urlunparseZnetlocsetr&ZasListrr/r0)selfZrequirement_stringZreqeZ parsed_urlrrr__init__[s4      zRequirement.__init__cCs|jg}|jr*|ddt|j|jr@|t|j|jrh|d|j|j rh|d|j r|d|j d|S)Nz[{0}]r!z@ {0} z; {0}r() r$r&appendr6joinsortedr/strr%r0)r:partsrrr__str__vs zRequirement.__str__cCsdt|S)Nz)r6rA)r:rrr__repr__szRequirement.__repr__N)rrrrr<rCrDrrrrr1Ns r1)EZ __future__rrrstringreZpip._vendor.pyparsingrrrrr r r r r rLZpip._vendor.six.moves.urllibrr8ZmarkersrrZ specifiersrrr ValueErrorrZ ascii_lettersZdigitsZALPHANUMsuppressZLBRACKETZRBRACKETZLPARENZRPARENCOMMAZ SEMICOLONATZ PUNCTUATIONZIDENTIFIER_ENDZ IDENTIFIERNAMEZEXTRAZURIZURLZ EXTRAS_LISTZEXTRASZ _regex_strVERBOSE IGNORECASEZVERSION_PEP440ZVERSION_LEGACYZ VERSION_ONEZ VERSION_MANYZ _VERSION_SPECZsetParseActionZ VERSION_SPECZMARKER_SEPARATORZMARKERZVERSION_AND_MARKERZURL_AND_MARKERZNAMED_REQUIREMENTr4r5objectr1rrrrsh