관리-도구
편집 파일: utils.cpython-312.pyc
� G��eh � �T � 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�Zdeeef defd�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-pip-23.3.1-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_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 �versionc �� � t | t � r t | � }n| }g }|j dk7 r|j |j � d�� |j t j dddj d� |j D � � � � |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 �!z(\.0)+$� �.c 3 �2 K � | ] }t |� �� � y �w�N��str��.0�xs r � <genexpr>z'canonicalize_version.<locals>.<genexpr><