o ¯)»aã@sxddlmZmZmZddlZddlmZmZddlm Z m Z er-ddl 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úX/opt/alt/python310/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/utils.pyÚcanonicalize_names rc Csîzt|ƒ}Wn ty|YSwg}|jdkr"| d |j¡¡| t ddd dd„|jDƒ¡¡¡|j durH| d d d„|j Dƒ¡¡|j durV| d  |j ¡¡|j durd| d  |j ¡¡|j durr| 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)+$ÚÚ.csó|]}t|ƒVqdS©N©Ústr©Ú.0ÚxrrrÚ /ó€z'canonicalize_version..Ncsrrrrrrrr3r z.post{0}z.dev{0}z+{0}) r rZepochÚappendÚformatÚrerÚjoinÚreleaseZpreZpostÚdevZlocal)Z_versionÚversionÚpartsrrrÚcanonicalize_versions$  þ &     r))Z __future__rrrr#Z_typingrrr'rr Útypingr r rr Úcompilerrr)rrrrÚs