관리-도구
편집 파일: utils.cpython-310.pyc
o ~�Re � @ sx d dl mZmZmZ d dlZddlmZmZ ddlm Z m Z er-d 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-python310-setuptools-58.3.0-2.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/setuptools/_vendor/packaging/utils.py�canonicalize_name s r c C s� zt | �}W n ty | Y S w g }|jdkr"|�d�|j�� |�t�ddd�dd� |jD ���� |j durH|�d�d d� |j D ��� |j durV|�d �|j �� |jdurd|�d�|j�� |jdurr|�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 � � | ]}t |�V qd S �N��str��.0�xr r r � <genexpr>/ � � z'canonicalize_version.<locals>.<genexpr>Nc s r 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$ � & r. )� __future__r r r r$ Z_typingr r r, r r �typingr r r r �compiler r r. r r r r �<module> s