£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>

Re
                 @   sn   d  d l  Z  d  d l m Z d  d l m Z d  d l m Z Gd d   d e  Z d d   Z d	 d
   Z	 d S)    N)Command)logger)pkg_resourcesc                   sF   e  Z d  Z d Z d Z d Z d Z   f d d   Z d d   Z   S)	ShowCommandz6Show information about one or more installed packages.showz$
      %prog [options] <package> ...z*Show information about installed packages.c                s^   t  t |   j | |   |  j j d d d d d d d d d	 d
 |  j j d |  j  d  S)Nz-fz--filesdestfilesaction
store_truedefaultFhelpz7Show the full list of installed files for each package.r   )superr   __init__cmd_opts
add_optionparserinsert_option_group)selfargskw)	__class__ ,/tmp/pip-ztkk0jow-build/pip/commands/show.pyr      s    		zShowCommand.__init__c             C   s=   | s t  j d  d  S| } t |  } t | | j  d  S)Nz.ERROR: Please provide a package name or names.)r   warnsearch_packages_infoprint_resultsr   )r   optionsr   queryresultsr   r   r   run   s    zShowCommand.run)	__name__
__module____qualname____doc__nameusagesummaryr   r   r   r   )r   r   r      s   r   c             c   s   t  d d   t j D  } x |  D] } | j   } | | k r# | | } i | j d 6| j d 6| j d 6d d   | j   D d 6} t j	 j
 | j | j   d d	  } t j	 j |  r | | d
 <n  | Vq# q# Wd S)z
    Gather details from installed distributions. Print distribution name,
    version, location, and installed files. Installed files requires a
    pip generated 'installed-files.txt' in the distributions '.egg-info'
    directory.
    c             S   s%   g  |  ] } | j  j   | f  q Sr   )project_namelower).0pr   r   r   
<listcomp>,   s   	 z(search_packages_info.<locals>.<listcomp>r$   versionlocationc             S   s   g  |  ] } | j   q Sr   )r'   )r)   depr   r   r   r+   5   s   	 requiresz	.egg-infozinstalled-files.txtr   N)dictr   working_setr(   r'   r,   r-   r/   ospathjoinegg_nameisfile)r   installed_packagesr$   normalized_namedistpackagefilelistr   r   r   r   $   s$    



		r   c             C   s   x |  D] } t  j d  t  j d | d  t  j d | d  t  j d | d  t  j d d	 j | d
   | r t  j d  d | k r x? t | d  D] } t  j d | j    q Wq t  j d  q q Wd S)zD
    Print the informations from installed distributions found.
    z---zName: %sr$   zVersion: %sr,   zLocation: %sr-   zRequires: %sz, r/   zFiles:r   z  %sz!Cannot locate installed-files.txtN)r   notifyr4   openstrip)distributionslist_all_filesr9   liner   r   r   r   @   s    r   )
r2   pip.basecommandr   pip.logr   pip._vendorr   r   r   r   r   r   r   r   <module>   s   