관리-도구
편집 파일: utils.cpython-38.pyc
U ʗ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 �Zeed�dd�Zeeef ed�dd�Zeeeeeee f d�dd�Zeeeef d�dd�ZdS )� N)� FrozenSet�NewType�Tuple�Union�cast� )�Tag� parse_tag)�InvalidVersion�Version� �NormalizedNamec @ s 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-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/packaging/utils.pyr s r c @ s e Zd ZdZdS )�InvalidSdistFilenamez^ An invalid sdist filename was found, users should refer to the packaging user guide. Nr r r r r r s 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 )�versionr c C s t | t�r2zt| �}W q6 tk r. | Y S X n| }g }|jdkrV|�|j� d�� |�t�ddd�dd� |j D ���� |j dk r�|�d�d d� |j D ��� |jdk r�|�d |j� �� |jdk r�|�d|j� �� |j dk r�|�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 s | ]}t |�V qd S �N��str��.0�xr r r � <genexpr><