관리-도구
편집 파일: metadata_legacy.cpython-38.pyc
U ʗRe� � @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZm Z m Z ddlmZ ddl mZ ddlmZ e�e�Zeed �d d�Zeeeeeed�d d�ZdS )z;Metadata generation logic for legacy source distributions. � N)�BuildEnvironment)�open_spinner)�InstallationError�InstallationSubprocessError�MetadataGenerationFailed)�make_setuptools_egg_info_args)�call_subprocess)� TempDirectory)� directory�returnc C sR dd� t �| �D �}|s&td| � ���t|�dkr@td�| ���t j�| |d �S )z.Find an .egg-info subdirectory in `directory`.c S s g | ]}|� d �r|�qS )z .egg-info)�endswith)�.0�f� r ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/operations/build/metadata_legacy.py� <listcomp> s z"_find_egg_info.<locals>.<listcomp>z No .egg-info directory found in � z-More than one .egg-info directory found in {}r )�os�listdirr �len�format�path�join)r � filenamesr r r �_find_egg_info s �r )� build_env� setup_py_path� source_dir�isolated�detailsr c C s� t �d||� tddd�j}t|||d�}| �^ td��J}zt||d|d� W n. tk r| } zt|d �|�W 5 d }~X Y nX W 5 Q R X W 5 Q R X t |�S )znGenerate metadata using setup.py-based defacto mechanisms. Returns the generated metadata directory. z2Running setup.py (path:%s) egg_info for package %szpip-egg-infoT)�kind�globally_managed)�egg_info_dir�no_user_configzPreparing metadata (setup.py)zpython setup.py egg_info)�cwd�command_desc�spinner)�package_detailsN) �logger�debugr r r r r r r r ) r r r r r r"