관리-도구
편집 파일: sdist.cpython-36.pyc
3 �Re� � @ s� d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl m Z e rpd dlmZm Z d dlmZ d d lmZ e je�ZG d d� de�ZdS )� N)�BuildEnvironment)�AbstractDistribution)�InstallationError)�runner_with_spinner_message)�MYPY_CHECK_RUNNING)�Set�Tuple)�Distribution)� PackageFinderc @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �SourceDistributionz�Represents a source distribution. The preparation step for these needs metadata for the packages to be generated, either using PEP 517 or using the legacy `setup.py egg_info`. c C s | j j� S )N)�req�get_dist)�self� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/distributions/sdist.py�get_pkg_resources_distribution s z1SourceDistribution.get_pkg_resources_distributionc C s2 | j j� | j jo|}|r$| j|� | j j� d S )N)r �load_pyproject_toml� use_pep517�_setup_isolation�prepare_metadata)r �finder�build_isolation�should_isolater r r �prepare_distribution_metadata s z0SourceDistribution.prepare_distribution_metadatac s � �fdd�}�j j}|d k s"t�t� �j _�j jj||dd� �j jj�j j�\� }� rd|d� � |r�tj d�j � tj ddj ttt |���� �j j�@ td �}�j j}|d k s�t�|j|�� |j� }W d Q R X W d Q R X �j jj|�\� }� �r|d � � �j jj||dd� d S ) Nc s6 d}|j �j| djdd� t� �D ��d�}t|��d S )NzZSome build dependencies for {requirement} conflict with {conflicting_with}: {description}.z, c s s | ]\}}d j ||�V qdS )z{} is incompatible with {}N)�format)�.0� installed�wantedr r r � <genexpr>6 s zPSourceDistribution._setup_isolation.<locals>._raise_conflicts.<locals>.<genexpr>)�requirement�conflicting_with�description)r r �join�sortedr )r �conflicting_reqs� format_string� error_message)�conflictingr r r �_raise_conflicts, s z=SourceDistribution._setup_isolation.<locals>._raise_conflicts�overlayzInstalling build dependenciesz"PEP 517/518 supported requirementsz4Missing build requirements in pyproject.toml for %s.z`The project does not specify a build backend, and pip cannot fall back to setuptools without %s.z and z#Getting requirements to build wheelzthe backend dependencies�normalzInstalling backend dependencies)r �pyproject_requires�AssertionErrorr � build_env�install_requirements�check_requirements�requirements_to_check�logger�warningr"