관리-도구
편집 파일: utils.cpython-310.pyc
o ƚReh � @ s d dl Z d dlmZmZmZmZmZ ddlmZm Z ddl mZmZ eed ee ef f Zede�ZG dd � d e�ZG d d� de�Ze �d�Ze �d �Zdedefdd�Zdeeef defdd�Zdedeeeeee f fdd�Zdedeeef fdd�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 r r ��/builddir/build/BUILDROOT/alt-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_vendor/packaging/utils.pyr � r c @ r )�InvalidSdistFilenamez^ An invalid sdist filename was found, users should refer to the packaging user guide. Nr r r r r r r r z[-_.]+z (\d+)(.*)�name�returnc C s t �d| ��� }tt|�S )N�-)�_canonicalize_regex�sub�lowerr r )r �valuer r r �canonicalize_name s r �versionc C s� t | t�rzt| �}W n ty | Y S w | }g }|jdkr)|�|j� d�� |�t�ddd�dd� |j D ���� |j durO|�d�d d� |j D ��� |jdur]|�d |j� �� |jdurk|�d|j� �� |j dury|�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 s � � | ]}t |�V qd S �N��str��.0�xr r r � <genexpr><