U
    „~$h÷  ã                   @   sX   d dl Z d dlmZmZ d dlmZ d dlmZ er@d dlm	Z	 G dd„ de j
d�ZdS )	é    N)ÚTYPE_CHECKINGÚOptional)ÚBaseDistribution)ÚInstallRequirement)ÚPackageFinderc                       sn   e Zd ZdZeddœ‡ fdd„Zejee	 dœdd„ƒZ
ejedœd	d
„ƒZejdeeddœdd„ƒZ‡  ZS )ÚAbstractDistributiona¦  A base class for handling installable artifacts.

    The requirements for anything installable are as follows:

     - we must be able to determine the requirement name
       (or we can't correctly handle the non-upgrade case).

     - for packages with setup requirements, we must also be able
       to determine their requirements without installing additional
       packages (for the same reason as run-time dependencies)

     - we must be able to create a Distribution object exposing the
       above metadata.

     - if we need to do work in the build tracker, we must be able to generate a unique
       string to identify the requirement in the build tracker.
    N)ÚreqÚreturnc                    s   t ƒ  ¡  || _d S ©N)ÚsuperÚ__init__r   )Úselfr   ©Ú	__class__© úD/tmp/pip-unpacked-wheel-g27rp152/pip/_internal/distributions/base.pyr      s    
zAbstractDistribution.__init__)r	   c                 C   s
   t ƒ ‚dS )zÖA string that uniquely identifies this requirement to the build tracker.

        If None, then this dist has no work to do in the build tracker, and
        ``.prepare_distribution_metadata()`` will not be called.N©ÚNotImplementedError©r   r   r   r   Úbuild_tracker_id"   s    z%AbstractDistribution.build_tracker_idc                 C   s
   t ƒ ‚d S r
   r   r   r   r   r   Úget_metadata_distribution*   s    z.AbstractDistribution.get_metadata_distributionr   )ÚfinderÚbuild_isolationÚcheck_build_depsr	   c                 C   s
   t ƒ ‚d S r
   r   )r   r   r   r   r   r   r   Úprepare_distribution_metadata.   s    z2AbstractDistribution.prepare_distribution_metadata)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   ÚabcÚabstractpropertyr   Ústrr   Úabstractmethodr   r   Úboolr   Ú__classcell__r   r   r   r   r      s   ûr   )Ú	metaclass)r   Útypingr   r   Zpip._internal.metadata.baser   Zpip._internal.reqr   Ú"pip._internal.index.package_finderr   ÚABCMetar   r   r   r   r   Ú<module>   s   