
вEbc           @@  s  d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l m	 Z	 m
 Z
 d  d l m Z d  d l m Z d  d l m Z d  d l m Z d  d l m Z d  d	 l m Z d  d
 l m Z d  d l m Z d  d l m Z d  d l m Z d  d l m Z  d  d l! m" Z# d  d l$ m% Z% d  d l$ m& Z' d  d l( m) Z) d  d l* m+ Z+ m, Z, d  d l- m. Z. d  d l/ m0 Z0 d  d l1 m2 Z2 d  d l3 m4 Z4 d  d l5 m6 Z6 d  d l7 m8 Z8 m9 Z9 m: Z: m; Z; m< Z< m= Z= m> Z> m? Z? m@ Z@ d  d lA mB ZB d  d lC mD ZD mE ZE d  d lF mG ZG d  d lH mI ZI d  d lJ mK ZK eG rd  d lL mM ZM mN ZN mO ZO mP ZP mQ ZQ mR ZR mS ZS d  d lT mU ZU d  d  lV mW ZW d  d! lX mY ZY d  d" l mZ ZZ n  e j[ e\  Z] d#   Z^ d$ e_ f d%     YZ` d&   Za d S('   i    (   t   absolute_importN(   t   pkg_resourcest   six(   t   Requirement(   t   canonicalize_name(   t   Version(   t   parse(   t   Pep517HookCaller(   t   NoOpBuildEnvironment(   t   InstallationError(   t
   get_scheme(   t   Link(   t   generate_metadata(   t   install_editable(   t   LegacyInstallFailure(   t   install(   t   install_wheel(   t   load_pyproject_tomlt   make_pyproject_path(   t   UninstallPathSet(   t
   deprecated(   t   direct_url_from_link(   t   Hashes(   t
   indent_log(	   t   ask_path_existst
   backup_dirt   display_patht   dist_in_site_packagest   dist_in_usersitet   get_distributiont   get_installed_versiont   hide_urlt   redact_auth_from_url(   t   get_metadata(   t   TempDirectoryt   tempdir_kinds(   t   MYPY_CHECK_RUNNING(   t   running_under_virtualenv(   t   vcs(   t   Anyt   Dictt   Iterablet   Listt   Optionalt   Sequencet   Union(   t   Marker(   t   SpecifierSet(   t   Distribution(   t   BuildEnvironmentc         C@  s   |  j  t j  } t j j |  \ } } t j | |  } | j d  rm t j } t j j	 |  d } nA | j d  s t
  t j } t j j	 |  d j d  d } | | d | d | S(   sQ   Return a pkg_resources.Distribution for the provided
    metadata directory.
    s	   .egg-infoi    s
   .dist-infot   -t   project_namet   metadata(   t   rstript   ost   sept   patht   splitR   t   PathMetadatat   endswithR0   t   splitextt   AssertionErrort   DistInfoDistribution(   t   metadata_directoryt   dist_dirt   base_dirt   dist_dir_nameR4   t   dist_clst	   dist_name(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt	   _get_distF   s    		#t   InstallRequirementc           B@  s  e  Z d  Z e d! d! d! e d! d! d! e d" e d  Z d   Z d   Z d   Z e	 d    Z
 e	 d    Z e	 d    Z e	 d    Z d! d	  Z e	 d
    Z e d  Z d   Z d   Z d   Z d   Z d   Z e	 d    Z e	 d    Z e	 d    Z e	 d    Z d   Z d   Z d   Z e	 d    Z d   Z d   Z  e e d  Z! e d  Z" e e d  Z# d   Z$ d   Z% d! d! d! d! e e e d   Z& RS(#   s   
    Represents something that may be installed later on, may have information
    about where to fetch the relevant requirement and also contains logic for
    installing the said requirement.
    c         C@  sC  | d  k s' t | t  s' t |   | |  _ | |  _ | |  _ | |  _ d  |  _ d  |  _	 |  j r | sr t  | j
 r t j j t j j | j   |  _	 q n  | d  k r | r | j r t | j  } n  | |  _ |  _ t |  _ d  |  _ |  j r|  j j
 r|  j j |  _ n  | r-| |  _ n+ | rLd   | j D |  _ n t   |  _ | d  k rv| rv| j } n  | |  _ d  |  _ t |  _ d  |  _ d  |  _ | r| n g  |  _ |	 r|	 n g  |  _  |
 r|
 n i  |  _! t |  _" | |  _# | |  _$ t%   |  _& d  |  _' d  |  _( g  |  _) d  |  _* | |  _+ t |  _, d  S(   Nc         S@  s   h  |  ] } t  j |   q S(    (   R   t
   safe_extra(   t   .0t   extra(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pys	   <setcomp>   s   	 (-   t   Nonet
   isinstanceR   R=   t   reqt
   comes_fromt
   constraintt   editablet   legacy_install_reasont
   source_dirt   is_fileR6   R8   t   normpatht   abspatht	   file_patht   urlR   t   linkt   original_linkt   Falset   original_link_is_in_wheel_cachet   local_file_patht   extrast   sett   markert   markerst   satisfied_byt   should_reinstallt   _temp_build_dirt   install_succeededt   install_optionst   global_optionst   hash_optionst   preparedt   user_suppliedt   isolatedR   t	   build_envR?   t   pyproject_requirest   requirements_to_checkt   pep517_backendt
   use_pep517t   needs_more_preparation(   t   selfRL   RM   RO   RW   R_   Rn   Ri   Rd   Re   Rf   RN   R\   Rh   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   __init__h   sX    '									!															c         C@  s   |  j  rF t |  j   } |  j rj | d j t |  j j   7} qj n$ |  j rd t |  j j  } n d } |  j d  k	 r | d j t |  j j	   7} n  |  j
 r t |  j
 t j  r |  j
 } n |  j
 j   } | r | d j |  7} q n  | S(   Ns    from {}s   <InstallRequirement>s    in {}s
    (from {})(   RL   t   strRW   t   formatR    RV   R`   RJ   R   t   locationRM   RK   R   t   string_typest	   from_path(   Rp   t   sRM   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   __str__   s     		%	"	c         C@  s"   d j  |  j j t |   |  j  S(   Ns   <{} object: {} editable={!r}>(   Rs   t	   __class__t   __name__Rr   RO   (   Rp   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   __repr__   s    c         @  sY   t  |     t    }   f d   t |  D } d j d |  j j d d j |   S(   s>   An un-tested helper for getting state, for debugging.
        c         3@  s%   |  ] } d  j  |   |  Vq d S(   s   {}={!r}N(   Rs   (   RH   t   attr(   t
   attributes(    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pys	   <genexpr>   s    s   <{name} object: {{{state}}}>t   namet   states   , (   t   varst   sortedRs   Ry   Rz   t   join(   Rp   t   namesR   (    (   R}   s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   format_debug   s    	c         C@  s/   |  j  d  k r d  St j t j |  j  j   S(   N(   RL   RJ   R   t
   ensure_strR   t	   safe_nameR~   (   Rp   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyR~      s    c         C@  s
   |  j  j S(   N(   RL   t	   specifier(   Rp   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyR     s    c         C@  s:   |  j  } t |  d k o9 t t |   j d d h k S(   s   Return whether I am pinned to an exact version.

        For example, some-package==1.2 is pinned; some-package>1.2 is not.
        i   s   ==s   ===(   R   t   lent   nextt   itert   operator(   Rp   t
   specifiers(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt	   is_pinned  s    	c         C@  s   t  |  j  S(   N(   R   R~   (   Rp   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   installed_version  s    c         @  s@   | s d } n    j  d  k	 r8 t   f d   | D  St Sd  S(   Nt    c         3@  s(   |  ] }   j  j i | d  6 Vq d S(   RI   N(   R_   t   evaluate(   RH   RI   (   Rp   (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pys	   <genexpr>#  s   (   R   (   R_   RJ   t   anyt   True(   Rp   t   extras_requested(    (   Rp   s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   match_markers  s    	c         C@  s   t  |  j  S(   s   Return whether any known-good hashes are specified as options.

        These activate --require-hashes mode; hashes specified as part of a
        URL do not.

        (   t   boolRf   (   Rp   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   has_hash_options(  s    	c         C@  sb   |  j  j   } | r |  j n |  j } | rX | j rX | j | j g   j | j  n  t |  S(   s  Return a hash-comparer that considers my option- and URL-based
        hashes to be known-good.

        Hashes in URLs--ones embedded in the requirements file, not ones
        downloaded from an index server--are almost peers with ones from
        flags. They satisfy --require-hashes (whether it was implicitly or
        explicitly activated) but do not activate it. md5 and sha224 are not
        allowed in flags, which should nudge people toward good algos. We
        always OR all hashes together, even ones from URLs.

        :param trust_internet: Whether to trust URL-based (#md5=...) hashes
            downloaded from the internet, as by populate_link()

        (	   Rf   t   copyRW   RX   t   hasht
   setdefaultt	   hash_namet   appendR   (   Rp   t   trust_internett   good_hashesRW   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   hashes3  s
    "c         C@  sy   |  j  d k r d St |  j   } |  j ru t |  j t j  rL |  j } n |  j j   } | ru | d | 7} qu n  | S(   s@   Format a nice indicator to show where this "comes from"
        s   ->N(   RL   RJ   Rr   RM   RK   R   Ru   Rv   (   Rp   Rw   RM   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyRv   I  s    	c      	   C@  s"  | d  k	 s t  |  j d  k	 r= |  j j s3 t  |  j j S|  j d  k rq t d t j d t  |  _ |  j j St	 |  j
  } | r d j | t j   j  } n  t j j |  s t j d |  t j |  n  t j j | |  } | r d  n t } t d | d | d t j d t  j S(   Nt   kindt   globally_manageds   {}_{}s   Creating directory %sR8   t   delete(   RJ   R=   Rb   R8   RL   R"   R#   t	   REQ_BUILDR   R   R~   Rs   t   uuidt   uuid4t   hexR6   t   existst   loggert   debugt   makedirsR   RY   (   Rp   t	   build_dirt
   autodeletet   parallel_buildst   dir_namet   actual_build_dirt
   delete_arg(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   ensure_build_locationY  s*    

	c         C@  s   |  j  d k s t  |  j d k	 s* t  |  j d k	 s? t  t t |  j d  t  rd d } n d } t d j	 |  j d | |  j d g   |  _  d S(   s3   Set requirement after generating metadata.
        R   s   ==s   ===R   t   NameN(
   RL   RJ   R=   R4   RQ   RK   t   parse_versionR   R   R   (   Rp   t   op(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   _set_requirement  s    	
c         C@  s^   t  |  j d  } t  |  j j  | k r/ d  St j d |  j | |  j  t |  |  _ d  S(   NR   se   Generating metadata for package %s produced metadata for project name %s. Fix your #egg=%s fragments.(   R   R4   RL   R~   R   t   warningR   (   Rp   t   metadata_name(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   warn_on_mismatching_name  s    c         C@  s   |  j  d k r d St |  j  j  } | s/ d S| j } |  j  j j | d t s d |  _ | r t	 |  rz t |  _
 q t   r t |  r t d j | j | j    q q t |  _
 n' |  j r t |  _
 d |  _ n	 | |  _ d S(   s   Find an installed distribution that satisfies or conflicts
        with this requirement, and set self.satisfied_by or
        self.should_reinstall appropriately.
        Nt   prereleasessV   Will not install to the user site because it will lack sys.path precedence to {} in {}(   RL   RJ   R   R~   t   parsed_versionR   t   containsR   R`   R   Ra   R%   R   R	   Rs   R3   Rt   RO   (   Rp   t   use_user_sitet   existing_distt   existing_version(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   check_if_exists  s*    					c         C@  s   |  j  s t S|  j  j S(   N(   RW   RY   t   is_wheel(   Rp   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyR     s    	c         C@  s+   t  j j |  j |  j r$ |  j j p' d  S(   NR   (   R6   R8   R   RQ   RW   t   subdirectory_fragment(   Rp   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   unpacked_source_directory  s    	c         C@  sm   |  j  s t d j |     t j j |  j d  } t j ri t	 | t j
  ri | j t j    } n  | S(   Ns   No source dir for {}s   setup.py(   RQ   R=   Rs   R6   R8   R   R   R   t   PY2RK   t	   text_typet   encodet   syst   getfilesystemencoding(   Rp   t   setup_py(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   setup_py_path  s
    c         C@  s+   |  j  s t d j |     t |  j  S(   Ns   No source dir for {}(   RQ   R=   Rs   R   R   (   Rp   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   pyproject_toml_path  s    c         C@  s   t  |  j |  j |  j t |    } | d k r= t |  _ d St |  _ | \ } } } } | |  _ | |  _	 t
 |  j | d | |  _ d S(   sA  Load the pyproject.toml file.

        After calling this routine, all of the attributes related to PEP 517
        processing for this requirement have been set. In particular, the
        use_pep517 attribute can be used to determine whether we should
        follow the PEP 517 or legacy (setup.py) code path.
        Nt   backend_path(   R   Rn   R   R   Rr   RJ   RY   R   Rl   Rk   R   R   Rm   (   Rp   t   pyproject_toml_datat   requirest   backendt   checkR   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyR     s    					c         C@  s   |  j  s^ |  j s t  t d |  j d |  j d |  j d |  j d |  j pZ d j |  j	   S|  j
 d k	 ss t  t d |  j d |  j
  S(	   sK   Invokes metadata generator functions, with the required arguments.
        Rj   R   RQ   Ri   t   detailss   from {}R   N(   Rn   R   R=   t   generate_metadata_legacyRj   R   Ri   R~   Rs   RW   Rm   RJ   R   (   Rp   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   _generate_metadata  s    						c         C@  s\   |  j  s t  t    |  j   |  _ Wd QX|  j sD |  j   n
 |  j   |  j   d S(   s   Ensure that project metadata is available.

        Under PEP 517, call the backend hook to prepare the metadata.
        Under legacy processing, call setup.py egg-info.
        N(	   RQ   R=   R   R   R?   R~   R   R   t   assert_source_matches_version(   Rp   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   prepare_metadata!  s    
	
c         C@  s.   t  |  d  s' t |  j    |  _ n  |  j S(   Nt	   _metadata(   t   hasattrR!   t   get_distR   (   Rp   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyR4   5  s    c         C@  s   t  |  j  S(   N(   RE   R?   (   Rp   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyR   =  s    c         C@  ss   |  j  s t  |  j d } |  j j rP | |  j j k rP t j d |  |  n t j d t |  j   | |   d  S(   Nt   versions'   Requested %s, but installing version %ss;   Source in %s has version %s, which satisfies requirement %s(	   RQ   R=   R4   RL   R   R   R   R   R   (   Rp   R   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyR   A  s    
c         C@  s4   |  j  d k r0 |  j | d | d | |  _  n  d S(   sA  Ensure that a source_dir is set.

        This will create a temporary build dir if the name of the requirement
        isn't known yet.

        :param parent_dir: The ideal pip parent_dir for the source_dir.
            Generally src_dir for editables and build_dir for sdists.
        :return: self.source_dir
        R   R   N(   RQ   RJ   R   (   Rp   t
   parent_dirR   R   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   ensure_has_source_dirT  s
    c         C@  s  |  j  s  t j d |  j  d  S|  j s/ t  |  j s> t  |  j  j d k rT d  Sd |  j  j k s~ t d j t	       |  j  j j
 d d  \ } } t j |  } | r\|  j  j sd j |  j  j  } d  } |  j  j j d  r d } n  t | | d	 d
 d d n  t |  j  j  } | rC| j |  j d | q}| j |  j d | n! d s}t d j |  j  |    d  S(   Ns>   Cannot update repository at %s; repository location is unknownt   filet   +s   bad url: {self.link.url!r}i   s5   This form of VCS requirement is being deprecated: {}.s   git+git@sm   git+https://git@example.com/..., git+ssh://git@example.com/..., or the insecure git+git://git@example.com/...t   gone_ins   21.0t   issuei  RV   i    s+   Unexpected version control type (in {}): {}(   RW   R   R   RQ   RO   R=   t   schemeRV   Rs   t   localsR9   R&   t   get_backendt   is_vcsRJ   t
   startswithR   R   t   obtaint   export(   Rp   R   t   vc_typeRV   t   vcs_backendt   reasont   replacementt
   hidden_url(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   update_editablel  s8    	
		c         C@  sq   |  j  s t  t |  j  j  } | s> t j d |  j  d St j d |  t j	 |  } | j
 | |  | S(   s  
        Uninstall the distribution currently satisfying this requirement.

        Prompts before removing or modifying files unless
        ``auto_confirm`` is True.

        Refuses to delete or modify files outside of ``sys.prefix`` -
        thus uninstallation within a virtual environment can only
        modify that virtual environment, even if the virtualenv is
        linked to global site-packages.

        s#   Skipping %s as it is not installed.s   Found existing installation: %sN(   RL   R=   R   R~   R   R   RJ   t   infoR   t	   from_distt   remove(   Rp   t   auto_confirmt   verboset   distt   uninstalled_pathset(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt	   uninstall  s    c         C@  s<   d   } t  j j | |  } | | |  } |  j d | S(   Nc         S@  sa   |  j  | t j j  s1 t d j t       |  t |  d }  |  j t j j d  }  |  S(   Ns2   name {name!r} doesn't start with prefix {prefix!r}i   t   /(	   R   R6   R8   R7   R=   Rs   R   R   t   replace(   R~   t   prefix(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   _clean_zip_name  s    R   (   R6   R8   R   R~   (   Rp   R8   t	   parentdirt   rootdirR   R~   (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   _get_archive_name  s    	
c         C@  sr  |  j  s t  | d k r d St } d j |  j |  j d  } t j j	 | |  } t j j
 |  r6t d j t |   d  } | d k r t } q6| d k r t j d	 t |   t j |  q6| d k rt |  } t j d
 t |  t |   t j | |  q6| d k r6t j d  q6n  | s@d St j | d t j d t } |  t j j t j j |  j   } x t j |  D] \ }	 }
 } xU |
 D]M } |  j | d |	 d | } t j | d  } d | _ | j  | d  qWxN | D]F } |  j | d |	 d | } t j j	 |	 |  } | j! | |  qWqWWd QXt j" d t |   d S(   s}   Saves archive to provided build_dir.

        Used for saving downloaded VCS requirements as part of `pip download`.
        Ns	   {}-{}.zipR   s8   The file {} exists. (i)gnore, (w)ipe, (b)ackup, (a)bort t   it   wt   bt   as   Deleting %ss   Backing up %s to %sit
   allowZip64R   R   R   i  i   R   s   Saved %s(   R   R   R   R   i  (#   RQ   R=   RJ   R   Rs   R~   R4   R6   R8   R   R   R   R   RY   R   R   R   R   t   shutilt   moveR   t   exitt   zipfilet   ZipFilet   ZIP_DEFLATEDt   normcaseRT   R   t   walkR   t   ZipInfot   external_attrt   writestrt   writeR   (   Rp   R   t   create_archivet   archive_namet   archive_patht   responset	   dest_filet
   zip_outputt   dirt   dirpatht   dirnamest	   filenamest   dirnamet   dir_arcnamet   zipdirt   filenamet   file_arcname(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   archive  sZ    					c	         C@  sy  t  |  j d | d | d | d |  j d | }	 | d  k	 rB | n g  } |  j r t | | d | d | d | d |  j d |  j d |  j d	 |  j d
 |  j t	 |  _
 d  S|  j r?|  j s t  d  }
 |  j r t |  j |  j |  j  }
 n  t |  j |  j d |	 d t |  j  d | d | d |
 d |  j t	 |  _
 d  St |  |  j } t |  |  j } yy t d | d | d | d | d | d | d | d |	 d |  j d |  j d |  j d	 |  j d
 |  j d t |  j   } WnH t k
 r} t |  _
 t j | j   n t k
 r(t	 |  _
   n X| |  _
 | ru|  j  d k rut! d d j" |  j  d d d d d d  n  d  S(   Nt   usert   homet   rootRi   R   R   R~   R   Rj   R   R   t   req_descriptiont	   pycompilet   warn_script_locationt
   direct_urlt	   requestedRd   Re   t   req_namei   R   sg   {} was installed using the legacy 'setup.py install' method, because a wheel could not be built for it.R   s+   to fix the wheel build issue reported aboveR   s   21.0R   (#   R
   R~   Ri   RJ   RO   t   install_editable_legacyR   Rj   R   R   Rc   R   R[   R=   RX   R   RQ   RZ   R   Rr   RL   Rh   t   listRe   Rd   t   install_legacyR   RY   R   t   reraiset   parentt	   ExceptionRP   R   Rs   (   Rp   Rd   Re   R  R  R   R   R   R  R   R!  t   successt   exc(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyR     s    								
				
										N(    ('   Rz   t
   __module__t   __doc__RY   RJ   Rq   Rx   R{   R   t   propertyR~   R   R   R   R   R   R   R   Rv   R   R   R   R   R   R   R   R   R   R   R   R4   R   R   R   R   R   R   R  R   (    (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyRF   a   sd   _					*			%					,		Bc      	   C@  sh   d } |  j  s d } n$ |  j r* d } n |  j r< d } n  | rd t d d d d d	 d  d
 d  n  | S(   NR   s3   Unnamed requirements are not allowed as constraintss$   Links are not allowed as constraintss   Constraints cannot have extrasR   s  Constraints are only allowed to take the form of a package name and a version specifier. Other forms were originally permitted as an accident of the implementation, but were undocumented. The new implementation of the resolver no longer supports these forms.R   s,   replacing the constraint with a requirement.R   R   i   (   R~   RW   R\   R   RJ   (   RL   t   problem(    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   check_invalid_constraint_typen  s    						
(b   t
   __future__R    t   loggingR6   R   R   R   R  t   pip._vendorR   R   t"   pip._vendor.packaging.requirementsR   t   pip._vendor.packaging.utilsR   t   pip._vendor.packaging.versionR   R   R   t   pip._vendor.pep517.wrappersR   t   pip._internal.build_envR   t   pip._internal.exceptionsR	   t   pip._internal.locationsR
   t   pip._internal.models.linkR   t'   pip._internal.operations.build.metadataR   t.   pip._internal.operations.build.metadata_legacyR   t0   pip._internal.operations.install.editable_legacyR   R$  t'   pip._internal.operations.install.legacyR   R   R&  t&   pip._internal.operations.install.wheelR   t   pip._internal.pyprojectR   R   t   pip._internal.req.req_uninstallR   t   pip._internal.utils.deprecationR   t&   pip._internal.utils.direct_url_helpersR   t   pip._internal.utils.hashesR   t   pip._internal.utils.loggingR   t   pip._internal.utils.miscR   R   R   R   R   R   R   R   R    t   pip._internal.utils.packagingR!   t   pip._internal.utils.temp_dirR"   R#   t   pip._internal.utils.typingR$   t   pip._internal.utils.virtualenvR%   t   pip._internal.vcsR&   t   typingR'   R(   R)   R*   R+   R,   R-   t   pip._vendor.packaging.markersR.   t    pip._vendor.packaging.specifiersR/   t   pip._vendor.pkg_resourcesR0   R1   t	   getLoggerRz   R   RE   t   objectRF   R0  (    (    (    s:   /tmp/pip-build-UPPWic/pip/pip/_internal/req/req_install.pyt   <module>   s^   @4	   