관리-도구
편집 파일: utils.cpython-312.pyc
� t��e � �^ � d dl Z d dlmZmZmZmZmZ ddlmZm Z ddl mZmZ eed ee ef f Z ede� Z G d� d e� Z G d � de� Z e j( d� Z e j( d � Zdedefd�Zdd�deeef dedefd�Zdedeeeeee f fd�Zdedeeef fd�Zy)� N)� FrozenSet�NewType�Tuple�Union�cast� )�Tag� parse_tag)�InvalidVersion�Version� �NormalizedNamec � � e Zd ZdZy)�InvalidWheelFilenamezM An invalid wheel filename was found, users should refer to PEP 427. N��__name__� __module__�__qualname__�__doc__r � ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/utils.pyr r � � �r r c � � e Zd ZdZy)�InvalidSdistFilenamez^ An invalid sdist filename was found, users should refer to the packaging user guide. Nr r r r r r r r r z[-_.]+z (\d+)(.*)�name�returnc �j � t j d| � j � }t t |� S )N�-)�_canonicalize_regex�sub�lowerr r )r �values r �canonicalize_namer# s* � ��#�#�C��.�4�4�6�E����&�&r T)�strip_trailing_zero�versionr$ c �� � t | t � r t | � }n| }g }|j dk7 r|j |j � d�� dj d� |j D � � }|rt j dd|� }|j |� |j �1|j dj d� |j D � � � |j �|j d|j � �� |j �|j d |j � �� |j �|j d |j � �� dj |� S # t $ r | cY S w xY w)z� This is very similar to Version.__str__, but has one subtle difference with the way it handles the release segment. r �!�.c 3 �2 K � | ] }t |� �� � y �w�N��str��.0�xs r � <genexpr>z'canonicalize_version.<locals>.<genexpr>= s � �� �>�!�s�1�v�>�� �z(\.0)+$� c 3 �2 K � | ] }t |� �� � y �wr* r+ r- s r r0 z'canonicalize_version.<locals>.<genexpr>E s � �� �8��S��V�8�r1 z.postz.dev�+)� isinstancer, r r �epoch�append�join�release�rer �pre�post�dev�local)r% r$ �parsed�parts�release_segments r �canonicalize_versionrB &