ó

\c           @   sd   d  d l  Z  d  d l Z d  d l m Z d  d l m Z d e f d     YZ d   Z d   Z d S(   i’’’’N(   t   Command(   t   loggert   ShowCommandc           B   s2   e  Z d  Z d Z d Z d Z d   Z d   Z RS(   s6   Show information about one or more installed packages.t   shows$   
      %prog [options] <package> ...s*   Show information about installed packages.c         O   s^   t  t |   j | |   |  j j d d d d d d d t d d	 |  j j d
 |  j  d  S(   Ns   -fs   --filest   destt   filest   actiont
   store_truet   defaultt   helps7   Show the full list of installed files for each package.i    (   t   superR   t   __init__t   cmd_optst
   add_optiont   Falset   parsert   insert_option_group(   t   selft   argst   kw(    (    sX   /data/av2000/b2b/venv/lib/python2.7/site-packages/pip-1.3-py2.7.egg/pip/commands/show.pyR      s    		c         C   s=   | s t  j d  d  S| } t |  } t | | j  d  S(   Ns.   ERROR: Please provide a package name or names.(   R   t   warnt   search_packages_infot   print_resultsR   (   R   t   optionsR   t   queryt   results(    (    sX   /data/av2000/b2b/venv/lib/python2.7/site-packages/pip-1.3-py2.7.egg/pip/commands/show.pyt   run   s    (   t   __name__t
   __module__t   __doc__t   namet   usaget   summaryR   R   (    (    (    sX   /data/av2000/b2b/venv/lib/python2.7/site-packages/pip-1.3-py2.7.egg/pip/commands/show.pyR      s   	c   	      c   sū   t  g  t j D] } | j j   | f ^ q  } xĆ |  D]» } | j   } | | k r8 | | } i | j d 6| j d 6| j d 6g  | j   D] } | j ^ q d 6} t j	 j
 | j | j   d d  } t j	 j |  rė | | d <n  | Vq8 q8 Wd S(	   sī   
    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.
    R   t   versiont   locationt   requiress	   .egg-infos   installed-files.txtR   N(   t   dictt   pkg_resourcest   working_sett   project_namet   lowerR!   R"   R#   t   ost   patht   joint   egg_namet   isfile(	   R   t   pt   installed_packagesR   t   normalized_namet   distt   dept   packaget   filelist(    (    sX   /data/av2000/b2b/venv/lib/python2.7/site-packages/pip-1.3-py2.7.egg/pip/commands/show.pyR   #   s$    .



&		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(   sD   
    Print the informations from installed distributions found.
    s   ---s   Name: %sR   s   Version: %sR!   s   Location: %sR"   s   Requires: %ss   , R#   s   Files:R   s     %ss!   Cannot locate installed-files.txtN(   R   t   notifyR+   t   opent   strip(   t   distributionst   list_all_filesR1   t   line(    (    sX   /data/av2000/b2b/venv/lib/python2.7/site-packages/pip-1.3-py2.7.egg/pip/commands/show.pyR   ?   s    (	   R)   R%   t   pip.basecommandR    t   pip.logR   R   R   R   (    (    (    sX   /data/av2000/b2b/venv/lib/python2.7/site-packages/pip-1.3-py2.7.egg/pip/commands/show.pyt   <module>   s   	