ó
~¾^Yc        
   @@  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 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
   COMMENT_RE(   t   get_installed_distributions(   t   pkg_resources(   t   canonicalize_name(   t   RequirementParseErrorc	         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  } xs t
 d | d d# d |  D]V } y t j j | |
  } Wn' t k
 r t j d | j  qŲ n X| | | j <qŲ W|  r1t   } xå|  D]Ż} t |  É} xæ| D]·} | j   s­| j   j d  s­|	 r|	 |  s­| j d$  rą| j   } | | k rd| j |  | Vqdqdn  | j d  sž| j d  rc| j d  r | d j   } n | t d  j   j d  } t j | d | d | d | } n- t j t j d |  j   d | d | } | j sĀt j  d | | j    t j  d  qd| j | k rłt j d | t j d |  j    qdt! | | j  j   V| | j =qdWWd  QXqHWd  Vn  xL t" | j#   d! d"   D]/ } t$ | j  | k rMt! |  j   VqMqMWd  S(%   Ns   dependency_links.txts   #egg=s   -f %st
   local_onlyt   skipt	   user_onlys   Could not parse requirement: %st   #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_cachet    sW   Skipping line in requirement file [%s] because it's not clear what it would install: %ss9     (add #egg=PackageName to the URL to avoid this warning)sD   Requirement file [%s] 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-QubATO/pip/pip/operations/freeze.pyt   <lambda>   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   loggert   warningt   project_nameR   t   sett   opent   stript
   startswitht   rstript   addt   lent   lstripR   t   from_editablet	   from_lineR   t   subt   infot   strt   sortedt   valuesR   (   t   requirementt
   find_linksR   R	   t
   skip_regexR   R   R   R   t
   skip_matcht   dependency_linkst   distt   linkt   installationst   reqt   emitted_optionst   req_file_patht   req_filet   linet   line_reqt   installation(    (    s2   /tmp/pip-build-QubATO/pip/pip/operations/freeze.pyt   freeze   s     	
	       			
(    (   t
   __future__R    t   loggingR   R   t   pip.reqR   t   pip.req.req_fileR   t	   pip.utilsR   t   pip._vendorR   t   pip._vendor.packaging.utilsR   t   pip._vendor.pkg_resourcesR   t	   getLoggert   __name__R!   R   t   FalseRB   (    (    (    s2   /tmp/pip-build-QubATO/pip/pip/operations/freeze.pyt   <module>   s    