Ñò
œèRc        
   @   sœ   d  d k  l Z d  d k l Z l Z d  d k l Z d  d k l Z d  d k	 l
 Z
 d  d k l Z l Z d  d k l Z l Z d e f d	 „  ƒ  YZ d
 S(   iÿÿÿÿ(   t   Command(   t   DistributionNotFoundt   BestVersionAlreadyInstalled(   t   PackageFinder(   t   logger(   t   InstallRequirement(   t   get_installed_distributionst   dist_is_editable(   t   make_option_groupt   index_groupt   ListCommandc           B   sz   e  Z d  Z d Z d Z d Z d g Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z d „  Z d „  Z RS(   s-   List installed packages, including editables.t   lists   
      %prog [options]s   List installed packages.t   pythonc      	   O   s  t  t |  ƒ i | | Ž  |  i } | i d d d d d t d d ƒ| i d d	 d d d t d d
 ƒ| i d d d d d t d d ƒ| i d d d d d t d d ƒ| i d d d d t d d ƒt t |  i ƒ } |  i i	 d | ƒ |  i i	 d | ƒ d  S(   Ns   -os
   --outdatedt   actiont
   store_truet   defaultt   helps,   List outdated packages (excluding editables)s   -us
   --uptodates,   List uptodate packages (excluding editables)s   -es
   --editables   List editable projects.s   -ls   --localsS   If in a virtualenv that has global access, do not list globally-installed packages.s   --presY   Include pre-release and development versions. By default, pip only finds stable versions.i    (
   t   superR
   t   __init__t   cmd_optst
   add_optiont   FalseR   R	   t   parsert   insert_option_group(   t   selft   argst   kwR   t
   index_opts(    (    sM   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/list.pyR      s<    					c         C   sU   t  d | i d | d | i d | i d | i d | i d | i d | i d	 | i ƒ 	S(
   sK   
        Create a package finder appropriate to this list command.
        t
   find_linkst
   index_urlst   use_mirrorst   mirrorst   allow_externalt   allow_insecuret   allow_all_externalt   allow_all_insecuret   allow_all_prereleases(	   R   R   R   R   R    R!   R"   R#   t   pre(   R   t   optionsR   (    (    sM   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/list.pyt   _build_package_finder9   s    						c         C   sb   | i  o |  i | ƒ nD | i o |  i | ƒ n) | i o |  i | ƒ n |  i | ƒ d  S(   N(   t   outdatedt   run_outdatedt   uptodatet   run_uptodatet   editablet   run_editablest   run_listing(   R   R&   R   (    (    sM   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/list.pyt   runH   s    


c         C   s[   xT |  i  | ƒ D]C \ } } } | | i j o$ t i d | i | i | f ƒ q q Wd  S(   Ns   %s (Current: %s Latest: %s)(   t   find_packages_latests_versionst   parsed_versionR   t   notifyt   project_namet   version(   R   R&   t   distt   remote_version_rawt   remote_version_parsed(    (    sM   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/list.pyR)   R   s
     c      	   c   sš  | i  g | i } | i o$ t i d d i | ƒ ƒ g  } n g  } xM t d | i d |  i ƒ D]0 } | i	 d ƒ o | i
 | i d ƒ ƒ qc qc W|  i | | ƒ } | i | ƒ t d | i d t d |  i ƒ } x¼ | D]´ } t i | i d  ƒ } y* | i | t ƒ } | d  j o wÞ n Wn1 t j
 o
 qÞ nJ t j
 o | i }	 n/ X| i | | i ƒ d }	 |	 d }
 |	 d } | |
 | f VqÞ Wd  S(	   Ns   Ignoring indexes: %st   ,t
   local_onlyt   skips   dependency_links.txtt   include_editablesi    i   (   t	   index_urlt   extra_index_urlst   no_indexR   R2   t   joinR   t   localR:   t   has_metadatat   extendt   get_metadata_linesR'   t   add_dependency_linksR   R   t	   from_linet   keyt   Nonet   find_requirementt   TrueR   R   t   installed_versiont   _link_package_versionst   name(   R   R&   R   t   dependency_linksR5   t   findert   installed_packagest   reqt   linkt   remote_versionR6   R7   (    (    sM   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/list.pyR0   X   s8    

 ! 

c         C   s,   t  d | i d |  i ƒ } |  i | ƒ d  S(   NR9   R:   (   R   R@   R:   t   output_package_listing(   R   R&   RO   (    (    sM   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/list.pyR.   }   s    c         C   s)   t  d | i d t ƒ } |  i | ƒ d  S(   NR9   t   editables_only(   R   R@   RI   RS   (   R   R&   RO   (    (    sM   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/list.pyR-      s    c         C   sz   t  | d d „  ƒ} x^ | D]V } t | ƒ o  d | i | i | i f } n d | i | i f } t i | ƒ q Wd  S(   NRF   c         S   s   |  i  i ƒ  S(    (   R3   t   lower(   R5   (    (    sM   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/list.pyt   <lambda>†   s    s   %s (%s, %s)s   %s (%s)(   t   sortedR   R3   R4   t   locationR   R2   (   R   RO   R5   t   line(    (    sM   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/list.pyRS   …   s      c         C   s[   g  } xA |  i  | ƒ D]0 \ } } } | i | j o | i | ƒ q q W|  i | ƒ d  S(   N(   R0   R1   t   appendRS   (   R   R&   R*   R5   R6   R7   (    (    sM   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/list.pyR+   Ž   s     (   t   __name__t
   __module__t   __doc__RL   t   usaget   summaryR:   R   R'   R/   R)   R0   R.   R-   RS   R+   (    (    (    sM   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/list.pyR
   
   s   		%		
		%				N(   t   pip.basecommandR    t   pip.exceptionsR   R   t	   pip.indexR   t   pip.logR   t   pip.reqR   t   pip.utilR   R   t   pip.cmdoptionsR   R	   R
   (    (    (    sM   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/list.pyt   <module>   s   