ó
^êWc        
   @@  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 d d d d d d e d d d 	 Z d S(	   i    (   t   absolute_importN(   t   InstallRequirement(   t   get_installed_distributions(   t   pkg_resources(   t   canonicalize_namec	         c@  sö  | p	 g  } d  }	 | r- t j |  j }	 n  g  }
 x9 t j D]. } | j d  r= |
 j | j d   q= q= Wx* | D]" } d | k rv |
 j	 |  qv qv Wx | D] } d | Vq£ Wi  } xE t
 d | d d! d |  D]( } t j j | |
  } | | | j <qĜ W|  r£t |   } xy| D]q} | j   si| j   j d  si|	 rZ|	 |  si| j d"  rz| 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 sGt j d | j    t j d  q | j | k rot j d | j    q t | | j  j   V| | j =q WWd  QXd Vn  xL t | j   d d    D]/ } t | j  | k rżt |  j   VqżqżWd  S(#   Ns   dependency_links.txts   #egg=s   -f %st
   local_onlyt   skipt	   user_onlyt   #s   -rs   --requirements   -Zs   --always-unzips   -fs   --find-linkss   -is   --index-urls   --pres   --trusted-hosts   --process-dependency-linkss   --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(    (    sf   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/operations/freeze.pyt   <lambda>p   s    (    (   s   -rs   --requirements   -Zs   --always-unzips   -fs   --find-linkss   -is   --index-urls   --pres   --trusted-hosts   --process-dependency-linkss   --extra-index-url(   t   Nonet   ret   compilet   searchR   t   working_sett   has_metadatat   extendt   get_metadata_linest   appendR   t   pipt   FrozenRequirementt	   from_distR   t   opent   stript
   startswitht   rstript   lent   lstripR   t   from_editablet	   from_linet   loggert   infot   warningt   strt   sortedt   valuesR   (   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(    (    sf   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/operations/freeze.pyt   freeze   s    		       			
(    (   t
   __future__R    t   loggingR   R   t   pip.reqR   t	   pip.utilsR   t   pip._vendorR   t   pip._vendor.packaging.utilsR   t	   getLoggert   __name__R&   R   t   FalseR9   (    (    (    sf   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/operations/freeze.pyt   <module>   s   