관리-도구
편집 파일: _dists.cpython-38.pyc
U ʗRe � @ s d dl Zd dlZd dlZd dlZd dlZd dlmZm Z m Z mZmZm Z mZmZ d dlmZ d dlmZmZ d dlmZ d dlmZmZ d dlmZmZmZmZm Z d dl!m"Z" d d l#m$Z$ d d l%m&Z&m'Z' ddl(m)Z)m*Z* G d d� dej+j,�Z-G dd� de�Z,dS )� N)� Collection�Dict�Iterable�Iterator�Mapping�Optional�Sequence�cast)�Requirement)�NormalizedName�canonicalize_name)�parse)�InvalidWheel�UnsupportedWheel)�BaseDistribution�BaseEntryPoint�DistributionVersion�InfoPath�Wheel)�normalize_path�� safe_extra)�parse_wheel�read_wheel_metadata_file� )�BasePath� get_dist_namec @ sr e Zd ZdZeejef ejdd�dd�Ze e jeed d�dd��Z eeej d �d d�Zeee d�d d�ZdS )�WheelDistributiona� An ``importlib.metadata.Distribution`` read from a wheel. Although ``importlib.metadata.PathDistribution`` accepts ``zipfile.Path``, its implementation is too "lazy" for pip's needs (we can't keep the ZipFile handle open for the entire lifetime of the distribution object). This implementation eagerly reads the entire metadata directory into the memory instead, and operates from that. N)�files� info_location�returnc C s || _ || _d S �N)�_filesr )�selfr r � r$ ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/metadata/importlib/_dists.py�__init__/ s zWheelDistribution.__init__)�zf�name�locationr c sL t �|�\� }� fdd���� D �}�fdd�|D �}t�|� �}| ||�S )Nc 3 s8 | ]0}|� � � d ��r|t�|�d d�d �fV qdS )�/r ���N)� startswith�pathlib� PurePosixPath�split)�.0r( )�info_dirr$ r% � <genexpr>? s �z1WheelDistribution.from_zipfile.<locals>.<genexpr>c s i | ]\}}|t � |��qS r$ )r )r0 �fullpath�relpath)r'