관리-도구
편집 파일: utils.cpython-311.pyc
� �Reh � � � 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�ZdS )� N)� FrozenSet�NewType�Tuple�Union�cast� )�Tag� parse_tag)�InvalidVersion�Version� �NormalizedNamec � � e Zd ZdZdS )�InvalidWheelFilenamezM An invalid wheel filename was found, users should refer to PEP 427. N��__name__� __module__�__qualname__�__doc__r � ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/packaging/utils.pyr r � � � � � � �� � � r r c � � e Zd ZdZdS )�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 � � t � d| � � � � � }t t |� � S )N�-)�_canonicalize_regex�sub�lowerr r )r �values r �canonicalize_namer# s3 � ��#�#�C��.�.�4�4�6�6�E����&�&�&r �versionc �� � t | t � � r# t | � � }n# t $ r | cY S w xY w| }g }|j dk r|� |j � d�� � |� t j ddd� d� |j D � � � � � � � � |j �7|� d� d� |j D � � � � � � |j �|� d |j � �� � |j �|� d |j � �� � |j �|� 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)+$� �.c 3 �4 K � | ]}t |� � V � �d S �N��str��.0�xs r � <genexpr>z'canonicalize_version.<locals>.<genexpr><