관리-도구
편집 파일: metadata_legacy.cpython-39.pyc
a ��Re� � @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m Z ddlmZ ddl mZ e�e�Zeed �d d�Zeeeeeed�d d�ZdS )z;Metadata generation logic for legacy source distributions. � N)�BuildEnvironment)�open_spinner)�InstallationError)�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-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/operations/build/metadata_legacy.py� <listcomp> � 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�}| �H td�� }t||d|d� W d � n1 s^0 Y W d � n1 s|0 Y 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�spinnerN)�logger�debugr r r r r r )r r r r r r! �argsr% r r r �generate_metadata s( �� �Br) )�__doc__�loggingr �pip._internal.build_envr �pip._internal.cli.spinnersr �pip._internal.exceptionsr �$pip._internal.utils.setuptools_buildr �pip._internal.utils.subprocessr �pip._internal.utils.temp_dirr � getLogger�__name__r&