<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
U
    ÀÒ.ee  ã                   @   sV   d dl Z d dlmZ d dlmZ d dlmZ d dlmZ e  	e
¡ZG dd„ deƒZdS )é    N)ÚBuildEnvironment)ÚAbstractDistribution)ÚInstallationError)Úrunner_with_spinner_messagec                   @   s(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	ÚSourceDistributionaÅ  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`.

    NOTE from @pradyunsg (14 June 2019)
    I expect SourceDistribution class will need to be split into
    `legacy_source` (setup.py based) and `source` (PEP 517 based) when we start
    bringing logic for preparation out of InstallRequirement into this class.
    c                 C   s
   | j  ¡ S ©N)ÚreqZget_dist)Úself© r
   úM/usr/lib/python3.8/site-packages/pip/_internal/distributions/source/legacy.pyÚget_pkg_resources_distribution   s    z1SourceDistribution.get_pkg_resources_distributionc                 C   s<   | j  ¡  | j jo|}|r$|  |¡ | j  ¡  | j  ¡  d S r   )r   Zload_pyproject_tomlZ
use_pep517Ú_setup_isolationZprepare_metadataZassert_source_matches_version)r	   ÚfinderZbuild_isolationZshould_isolater
   r
   r   Úprepare_distribution_metadata   s    


z0SourceDistribution.prepare_distribution_metadatac              
      sü   ‡ ‡fdd„}t ƒ ˆj_ˆjj |ˆjjdd¡ ˆjj ˆjj¡\‰ }ˆ rT|dˆ ƒ |r‚t dˆj¡ t dd 	t
tt|ƒƒ¡¡ ˆjj4 td	ƒ}ˆjj}| |¡ | ¡ }W 5 Q R X W 5 Q R X ˆjj |¡\‰ }ˆ rä|d
ˆ ƒ ˆjj ||dd¡ d S )Nc                    s6   d}|j ˆj| d dd„ tˆ ƒD ƒ¡d}t|ƒ‚d S )NzZSome build dependencies for {requirement} conflict with {conflicting_with}: {description}.z, c                 s   s   | ]\}}d ||f V  qdS )z%s is incompatible with %sNr
   )Ú.0Z	installedZwantedr
   r
   r   Ú	<genexpr>3   s   ÿzPSourceDistribution._setup_isolation.<locals>._raise_conflicts.<locals>.<genexpr>)ZrequirementÚconflicting_withÚdescription)Úformatr   ÚjoinÚsortedr   )r   Zconflicting_reqsÚformat_stringZerror_message©Zconflictingr	   r
   r   Ú_raise_conflicts+   s    ÿ
þýz=SourceDistribution._setup_isolation.<locals>._raise_conflictsZoverlayzInstalling 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 wheelzthe backend dependenciesZnormalzInstalling backend dependencies)r   r   Z	build_envZinstall_requirementsZpyproject_requiresZcheck_requirementsZrequirements_to_checkÚloggerZwarningr   ÚmapÚreprr   r   Zpep517_backendZsubprocess_runnerZget_requires_for_build_wheel)r	   r   r   ZmissingZrunnerZbackendZreqsr
   r   r   r   *   sP    
  þÿÿþý
ÿ
  þz#SourceDistribution._setup_isolationN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r
   r
   r
   r   r      s   r   )ZloggingZpip._internal.build_envr   Z pip._internal.distributions.baser   Zpip._internal.exceptionsr   Zpip._internal.utils.subprocessr   Z	getLoggerr   r   r   r
   r
   r
   r   Ú<module>   s   
