a ˆåÏhã@sxddlmZmZmZddlZddlmZmZddlm Z m Z erZddl m Z m Z e deƒZe d¡Zd d „Zd d „ZdS) é)Úabsolute_importÚdivisionÚprint_functionNé)Ú TYPE_CHECKINGÚcast)ÚInvalidVersionÚVersion)ÚNewTypeÚUnionÚNormalizedNamez[-_.]+cCst d|¡ ¡}td|ƒS)Nú-r )Ú_canonicalize_regexÚsubÚlowerr)ÚnameÚvalue©rúF/usr/lib/python3.9/site-packages/setuptools/_vendor/packaging/utils.pyÚcanonicalize_namesrc Csîz t|ƒ}Wnty"|YS0g}|jdkrD| d |j¡¡| t ddd dd„|jDƒ¡¡¡|j dur| d d d„|j Dƒ¡¡|j dur¬| d  |j ¡¡|j durÈ| d  |j ¡¡|j durä| d  |j ¡¡d |¡S) z This is very similar to Version.__str__, but has one subtle difference with the way it handles the release segment. rz{0}!z(\.0)+$ÚÚ.css|]}t|ƒVqdS©N©Ústr©Ú.0ÚxrrrÚ /óz'canonicalize_version..Ncss|]}t|ƒVqdSrrrrrrr3rz.post{0}z.dev{0}z+{0}) r rZepochÚappendÚformatÚrerÚjoinÚreleaseZpreZpostÚdevÚlocal)Ú_versionÚversionÚpartsrrrÚcanonicalize_versions"    &    r*)Z __future__rrrr"Z_typingrrr(rr Útypingr r rr Úcompilerrr*rrrrÚs