ó
©9Vc        
   @@  s¾   d  d l  m Z d  d l Z d  d l Z 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 j e ƒ Z e d d d	 g Z d d d d d e d e d d
 „	 Z d S(   i    (   t   absolute_importN(   t   stdlib_pkgs(   t   InstallRequirement(   t   get_installed_distributions(   t   pkg_resourcest
   setuptoolst   pipt
   distributec	         c@  sä  | p	 g  } d  }	 | r* t j | ƒ }	 n  g  }
 x9 t j D]. } | j d ƒ r: |
 j | j d ƒ ƒ q: q: Wx* | D]" } d | k rs |
 j | ƒ qs qs Wx | D] } d | Vq  Wi  } xK t	 d | d t
 d | ƒ D]. } t j j | |
 d | ƒ} | | | j <qÕ W|  r©t |  ƒ †} x|| D]t} | j ƒ  so| j ƒ  j d ƒ so|	 r`|	 j | ƒ so| j d ƒ r€| j ƒ  Vq#n  | j d ƒ sž| j d ƒ r| j d ƒ rÀ| d j ƒ  } n | t d ƒ j ƒ  j d ƒ } t j | d | d | d | ƒ} n t j | d | d | ƒ} | j sMt j d | j ƒ  ƒ t j d ƒ q#| j | k rut j d | j ƒ  ƒ q#t | | j ƒ j ƒ  V| | j =q#WWd  QXd Vn  x4 t | j ƒ  d d „  ƒD] } t | ƒ j ƒ  VqÅWd  S(    Ns   dependency_links.txts   #egg=s   -f %st
   local_onlyt   skipt	   user_onlyt	   find_tagst   #s   -rs   --requirements   -Zs   --always-unzips   -fs   --find-linkss   -is   --index-urls   --extra-index-urls   -es
   --editablei   t   =t   default_vcst   isolatedt   wheel_caches>   Skipping line because it's not clear what it would install: %ss9     (add #egg=PackageName to the URL to avoid this warning)s?   Requirement file contains %s, but that package is not installeds7   ## The following requirements were added by pip freeze:t   keyc         S@  s   |  j  j ƒ  S(   N(   t   namet   lower(   t   x(    (    s2   /tmp/pip-build-5Z5nTX/pip/pip/operations/freeze.pyt   <lambda>q   s    (	   s   -rs   --requirements   -Zs   --always-unzips   -fs   --find-linkss   -is   --index-urls   --extra-index-url(   t   Nonet   ret   compileR   t   working_sett   has_metadatat   extendt   get_metadata_linest   appendR   t   freeze_excludesR   t   FrozenRequirementt	   from_distR   t   opent   stript
   startswitht   searcht   rstript   lent   lstripR   t   from_editablet	   from_linet   loggert   infot   warningt   strt   sortedt   values(   t   requirementt
   find_linksR   R
   t
   skip_regexR   R   R   R   t
   skip_matcht   dependency_linkst   distt   linkt   installationst   reqt   req_filet   linet   line_reqt   installation(    (    s2   /tmp/pip-build-5Z5nTX/pip/pip/operations/freeze.pyt   freeze   s„    		    			
(   t
   __future__R    t   loggingR   R   t
   pip.compatR   t   pip.reqR   t	   pip.utilsR   t   pip._vendorR   t	   getLoggert   __name__R*   R   R   t   FalseR=   (    (    (    s2   /tmp/pip-build-5Z5nTX/pip/pip/operations/freeze.pyt   <module>   s   