3 \90ã@s:ddlZGdd„dƒZGdd„deƒZGdd„deƒZdS)éNc@sFeZdZddd„Zdd„Zdd„Zdd „Zd d „Zd d „Zdd„Z dS)ÚVersionNcCs|r|j|ƒdS)N)Úparse)ÚselfÚvstring©rú)/usr/lib64/python3.6/distutils/version.pyÚ__init__&szVersion.__init__cCsd|jjt|ƒfS)Nz %s ('%s'))Ú __class__Ú__name__Ústr)rrrrÚ__repr__*szVersion.__repr__cCs|j|ƒ}|tkr|S|dkS)Nr)Ú_cmpÚNotImplemented)rÚotherÚcrrrÚ__eq__-s zVersion.__eq__cCs|j|ƒ}|tkr|S|dkS)Nr)r r)rrrrrrÚ__lt__3s zVersion.__lt__cCs|j|ƒ}|tkr|S|dkS)Nr)r r)rrrrrrÚ__le__9s zVersion.__le__cCs|j|ƒ}|tkr|S|dkS)Nr)r r)rrrrrrÚ__gt__?s zVersion.__gt__cCs|j|ƒ}|tkr|S|dkS)Nr)r r)rrrrrrÚ__ge__Es zVersion.__ge__)N) r Ú __module__Ú __qualname__rr rrrrrrrrrrs rc@s8eZdZejdejejBƒZdd„Zdd„Z dd„Z dS) Ú StrictVersionz)^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$cCsŽ|jj|ƒ}|std|ƒ‚|jdddddƒ\}}}}}|rTttt|||gƒƒ|_nttt||gƒƒd|_|r„|dt|ƒf|_nd|_dS) Nzinvalid version number '%s'ééééér)r) Ú version_reÚmatchÚ ValueErrorÚgroupÚtupleÚmapÚintÚversionÚ prerelease)rrrÚmajorÚminorZpatchr&Zprerelease_numrrrr†s  zStrictVersion.parsecCsb|jddkr*djtt|jdd…ƒƒ}ndjtt|jƒƒ}|jr^||jdt|jdƒ}|S)NrrÚ.r)r%Újoinr#r r&)rrrrrÚ__str__™s zStrictVersion.__str__cCs t|tƒrt|ƒ}|j|jkr2|j|jkr.dSdS|j rF|j rFdS|jrX|j rXdS|j rj|jrjdS|jrœ|jrœ|j|jkr†dS|j|jkr–dSdSndS)Nrréÿÿÿÿr,r,)Ú isinstancer rr%r&)rrrrrr ¦s&      zStrictVersion._cmpN) r rrÚreÚcompileÚVERBOSEÚASCIIrrr+r rrrrr]s % rc@sDeZdZejdejƒZd dd„Zdd„Zdd„Z d d „Z d d „Z dS)Ú LooseVersionz(\d+ | [a-z]+ | \.)NcCs|r|j|ƒdS)N)r)rrrrrr.szLooseVersion.__init__c Csb||_dd„|jj|ƒDƒ}x:t|ƒD].\}}yt|ƒ||<Wq&tk rRYq&Xq&W||_dS)NcSsg|]}|r|dkr|‘qS)r)r)Ú.0Úxrrrú 8sz&LooseVersion.parse..)rÚ component_reÚsplitÚ enumerater$r r%)rrZ componentsÚiÚobjrrrr3s zLooseVersion.parsecCs|jS)N)r)rrrrr+CszLooseVersion.__str__cCs dt|ƒS)NzLooseVersion ('%s'))r )rrrrr GszLooseVersion.__repr__cCsFt|tƒrt|ƒ}|j|jkr"dS|j|jkr2dS|j|jkrBdSdS)Nrrr,)r-r r2r%)rrrrrr Ks    zLooseVersion._cmp)N) r rrr.r/r0r6rrr+r r rrrrr2 s ! r2)r.rrr2rrrrÚs>/