abc@`snddlmZmZmZddlZddlZddlZddlmZddddd gZ ej d d d d dddgZ dZ de fdYZdefdYZdefdYZejdejZidd6dd6dd6dd6dd 6ZdZdZdZdefd YZd!Zejd"Zd#Zd$ZdS(%i(tabsolute_importtdivisiontprint_functionNi(tInfinitytparsetVersiont LegacyVersiontInvalidVersiontVERSION_PATTERNt_VersiontepochtreleasetdevtpretposttlocalcC`s-yt|SWntk r(t|SXdS(s Parse the given version string and return either a :class:`Version` object or a :class:`LegacyVersion` object depending on if the given version is a valid PEP 440 version or a legacy version. N(RRR(tversion((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyRs cB`seZdZRS(sF An invalid version was found, users should refer to PEP 440. (t__name__t __module__t__doc__(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR$st _BaseVersioncB`sPeZdZdZdZdZdZdZdZdZ RS(cC`s t|jS(N(thasht_key(tself((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt__hash__,scC`s|j|dS(NcS`s ||kS(N((tsto((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt0t(t_compare(Rtother((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt__lt__/scC`s|j|dS(NcS`s ||kS(N((RR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR3R(R(RR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt__le__2scC`s|j|dS(NcS`s ||kS(N((RR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR6R(R(RR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt__eq__5scC`s|j|dS(NcS`s ||kS(N((RR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR9R(R(RR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt__ge__8scC`s|j|dS(NcS`s ||kS(N((RR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR<R(R(RR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt__gt__;scC`s|j|dS(NcS`s ||kS(N((RR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR?R(R(RR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt__ne__>scC`s&t|tstS||j|jS(N(t isinstanceRtNotImplementedR(RRtmethod((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyRAs( RRRRR R!R"R#R$R(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR*s       cB`sneZdZdZdZedZedZedZedZ edZ RS(cC`s%t||_t|j|_dS(N(tstrt_versiont_legacy_cmpkeyR(RR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt__init__JscC`s|jS(N(R)(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt__str__NscC`sdjtt|S(Ns(tformattreprR((R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt__repr__QscC`s|jS(N(R)(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pytpublicTscC`s|jS(N(R)(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt base_versionXscC`sdS(N(tNone(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR\scC`stS(N(tFalse(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt is_prerelease`scC`stS(N(R3(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pytis_postreleaseds( RRR+R,R/tpropertyR0R1RR4R5(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyRHs   s(\d+ | [a-z]+ | \.| -)tctpreviewsfinal-t-trct@cc`sxxltj|D][}tj||}| s|dkrAqn|d dkrb|jdVqd|VqWdVdS(Nt.it 0123456789it*s*final(t_legacy_version_component_retsplitt_legacy_version_replacement_maptgettzfill(Rtpart((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyt_parse_version_partsrs cC`sd}g}xt|jD]}|jdr|dkrjx'|rf|ddkrf|jqCWnx'|r|ddkr|jqmWn|j|qWt|}||fS(NiR>s*finals*final-t00000000(REtlowert startswithtpoptappendttuple(RR tpartsRD((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR*s  s v? (?: (?:(?P[0-9]+)!)? # epoch (?P[0-9]+(?:\.[0-9]+)*) # release segment (?P
                                          # pre-release
            [-_\.]?
            (?P(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P[0-9]+)?
        )?
        (?P                                         # post release
            (?:-(?P[0-9]+))
            |
            (?:
                [-_\.]?
                (?Ppost|rev|r)
                [-_\.]?
                (?P[0-9]+)?
            )
        )?
        (?P                                          # dev release
            [-_\.]?
            (?Pdev)
            [-_\.]?
            (?P[0-9]+)?
        )?
    )
    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
cB`seZejdedejejBZdZdZ	dZ
edZedZ
edZedZed	ZRS(
s^\s*s\s*$cC`s[|jj|}|s0tdj|ntd|jdrZt|jdnddtd|jdjdDdt	|jd|jd	d
t	|jd|jdp|jd
dt	|jd|jddt
|jd|_t|jj
|jj|jj|jj|jj|jj|_dS(NsInvalid version: '{0}'R
iRcs`s|]}t|VqdS(N(tint(t.0ti((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pys	sR<R
tpre_ltpre_nRtpost_ltpost_n1tpost_n2Rtdev_ltdev_nR(t_regextsearchRR-R	tgroupRMRKR@t_parse_letter_versiont_parse_local_versionR)t_cmpkeyR
RR
RRRR(RRtmatch((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR+s.*(!					cC`sdjtt|S(Ns(R-R.R((R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR/scC`sSg}|jjdkr7|jdj|jjn|jdjd|jjD|jjdk	r|jdjd|jjDn|jjdk	r|jdj|jjdn|jj	dk	r|jd	j|jj	dn|jj
dk	rF|jd
jdjd|jj
Dndj|S(Nis{0}!R<cs`s|]}t|VqdS(N(R((RNtx((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pys	sRcs`s|]}t|VqdS(N(R((RNR^((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pys	ss.post{0}is.dev{0}s+{0}cs`s|]}t|VqdS(N(R((RNR^((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pys	s(R)R
RJR-tjoinRR
R2RRR(RRL((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR,s&)##,cC`st|jdddS(Nt+ii(R(R@(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR0
scC`sjg}|jjdkr7|jdj|jjn|jdjd|jjDdj|S(Nis{0}!R<cs`s|]}t|VqdS(N(R((RNR^((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pys	sR(R)R
RJR-R_R(RRL((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR1s
&cC`s0t|}d|kr,|jdddSdS(NR`i(R(R@(Rtversion_string((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyRscC`st|jjp|jjS(N(tboolR)RR
(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR4!scC`st|jjS(N(RbR)R(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR5%s(RRtretcompileRtVERBOSEt
IGNORECASERWR+R/R,R6R0R1RR4R5(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyRs	#		
cC`s|r|dkrd}n|j}|dkr<d}n?|dkrQd}n*|d
krfd	}n|dkr{d}n|t|fS|r|rd}|t|fSdS(NitalphatatbetatbR7R
R8R:trevtrR(R7R
R8(RkRl(R2RGRM(tlettertnumber((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyRZ*s 					
s[\._-]cC`s-|dk	r)tdtj|DSdS(sR
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    cs`s3|])}|js!|jn	t|VqdS(N(tisdigitRGRM(RNRD((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pys	RsN(R2RKt_local_version_seperatorsR@(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR[LscC`sttttjdt|}|dkr[|dkr[|dk	r[t}n|dkrpt}n|dkrt}n|dkrt}n|dkrt}ntd|D}||||||fS(NcS`s
|dkS(Ni((R^((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR`Rcs`s7|]-}t|tr$|dfn
t|fVqdS(RN(R%RMR(RNRO((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pys	s(RKtreversedtlistt	itertoolst	dropwhileR2R(R
RR
RRR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyR\Ws&	$
	
	
	
(t
__future__RRRtcollectionsRsRct_structuresRt__all__t
namedtupleR	Rt
ValueErrorRtobjectRRRdReR?RARER*RRRZRpR[R\(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyts0	!&		9k