
0c@_‘  ã               @   s›   d  d l  Z  d  d l m Z d  d l m Z e rr d  d l m Z d  d l m Z d  d l	 m
 Z
 d  d l m Z e e  j ƒ Gd d	 „  d	 e ƒ ƒ Z d S)
é    N)Úadd_metaclass)ÚMYPY_CHECK_RUNNING)ÚOptional)ÚDistribution)ÚInstallRequirement)ÚPackageFinderc                   sR   e  Z d  Z d Z ‡  f d d †  Z e j d d „  ƒ Z e j d d „  ƒ 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.
    c                s    t  t |  ƒ j ƒ  | |  _ d  S)N)Úsuperr   Ú__init__Úreq)Úselfr   )Ú	__class__© ú?/tmp/pip-build-jynh7p1z/pip/pip/_internal/distributions/base.pyr
       s    zAbstractDistribution.__init__c             C   s   t  ƒ  ‚ d  S)N)ÚNotImplementedError)r   r   r   r   Úget_pkg_resources_distribution%   s    z3AbstractDistribution.get_pkg_resources_distributionc             C   s   t  ƒ  ‚ d  S)N)r   )r   ÚfinderZbuild_isolationr   r   r   Úprepare_distribution_metadata*   s    z2AbstractDistribution.prepare_distribution_metadata)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   ÚabcÚabstractmethodr   r   r   r   )r   r   r      s   r   )r   Zpip._vendor.sixr   Zpip._internal.utils.typingr   Ztypingr   Zpip._vendor.pkg_resourcesr   Zpip._internal.reqr   Z"pip._internal.index.package_finderr   ÚABCMetaÚobjectr   r   r   r   r   Ú<module>   s   