관리-도구
편집 파일: utils.cpython-39.pyc
a (�Re � @ sx d dl mZmZmZ d dlZddlmZmZ ddlm Z m Z erZd dlmZm Z ede�Ze�d�Zd d � Zdd� ZdS ) � )�absolute_import�division�print_functionN� )� TYPE_CHECKING�cast)�InvalidVersion�Version)�NewType�Union�NormalizedNamez[-_.]+c C s t �d| ��� }td|�S )N�-r )�_canonicalize_regex�sub�lowerr )�name�value� r ��/builddir/build/BUILDROOT/alt-python39-setuptools-58.3.0-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/utils.py�canonicalize_name s r c C s� zt | �}W n ty" | Y S 0 g }|jdkrD|�d�|j�� |�t�ddd�dd� |jD ���� |j dur�|�d�d d� |j D ��� |j dur�|�d �|j �� |jdur�|�d�|j�� |jdur�|�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. r z{0}!z(\.0)+$� �.c s s | ]}t |�V qd S �N��str��.0�xr r r � <genexpr>/ � z'canonicalize_version.<locals>.<genexpr>Nc s s | ]}t |�V qd S r r r r r r r 3 r z.post{0}z.dev{0}z+{0}) r r �epoch�append�format�rer �join�release�pre�post�dev�local)�_version�version�partsr r r �canonicalize_version s"