o ~Re@sxddlmZmZmZddlZddlmZmZddlm Z m Z er-ddl m Z m Z e deZedZd d Zd d ZdS) )absolute_importdivisionprint_functionN) TYPE_CHECKINGcast)InvalidVersionVersion)NewTypeUnionNormalizedNamez[-_.]+cCstd|}td|S)N-r )_canonicalize_regexsublowerr)namevaluer/builddir/build/BUILDROOT/alt-python310-setuptools-58.3.0-2.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/setuptools/_vendor/packaging/utils.pycanonicalize_names rc Cszt|}Wn ty|YSwg}|jdkr"|d|j|tddddd|jD|j durH|dd 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|VqdSNstr.0xrrr /z'canonicalize_version..Ncsrrrrrrrr3r z.post{0}z.dev{0}z+{0}) r repochappendformatrerjoinreleaseprepostdevlocal)_versionversionpartsrrrcanonicalize_versions$   &     r.) __future__rrrr$Z_typingrrr,rr typingr r rr compilerrr.rrrrs