U ÀÒ.eðã@sJddlmZmZmZddlZddlmZmZe d¡Z dd„Z dd „Z dS) é)Úabsolute_importÚdivisionÚprint_functionNé)ÚInvalidVersionÚVersionz[-_.]+cCst d|¡ ¡S)Nú-)Ú_canonicalize_regexÚsubÚlower)Úname©r ú?/usr/lib/python3.8/site-packages/pip/_vendor/packaging/utils.pyÚcanonicalize_namesrc Csðz t|ƒ}Wntk r$|YSXg}|jdkrF| d |j¡¡| t ddd dd„|jDƒ¡¡¡|j dk r’| d d d„|j Dƒ¡¡|j dk r®| d  |j ¡¡|j dk rÊ| d  |j ¡¡|j dk ræ| d  |j ¡¡d |¡S) z‚ This is very similar to Version.__str__, but has one subtle differences with the way it handles the release segment. rz{0}!z(\.0)+$ÚÚ.css|]}t|ƒVqdS©N©Ústr©Ú.0Úxr r rÚ 'sz'canonicalize_version..Ncss|]}t|ƒVqdSrrrr r rr+sz.post{0}z.dev{0}z+{0}) rrZepochÚappendÚformatÚrer ÚjoinÚreleaseZpreZpostZdevZlocal)ÚversionÚpartsr r rÚcanonicalize_versions"   &    r ) Z __future__rrrrrrrÚcompiler rr r r r rÚs