
}_                 @   s  d  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 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 d d l m Z e j e e j e e
 j e
 e j e e j e e j e e j e e j e e j e e j e e j e e j e i Z e e e e e e e e e e
 e e g Z d d d  Z d d   Z d d   Z  d S)z%
Package containing all pip commands
    )absolute_import)CompletionCommand)DownloadCommand)FreezeCommand)HashCommand)HelpCommand)ListCommand)CheckCommand)SearchCommand)ShowCommand)InstallCommand)UninstallCommand)WheelCommandTc             c   sM   |  r t  t t  } n t j   } x" | D] \ } } | | j f Vq+ Wd S)z5Yields sorted (command name, command summary) tuples.N)_sort_commandscommands_dictcommands_orderitemssummary)orderedcmditemsnamecommand_class r   4/tmp/pip-build-3_sjtvrs/pip/pip/commands/__init__.pyget_summaries4   s
    r   c             C   sG   d d l  m } |  j   }  | |  t j    } | r? | d Sd Sd S)zCommand name auto-correct.r   )get_close_matchesFN)difflibr   lowerr   keys)r   r   close_commandsr   r   r   get_similar_commands@   s    r    c                s(     f d d   } t  |  j   d | S)Nc                s2   y   j  |  d  SWn t k
 r- d SYn Xd  S)N      )index
ValueError)key)orderr   r   keyfnO   s    z_sort_commands.<locals>.keyfnr%   )sortedr   )cmddictr&   r'   r   )r&   r   r   N   s    r   N)!__doc__
__future__r   pip.commands.completionr   pip.commands.downloadr   pip.commands.freezer   pip.commands.hashr   pip.commands.helpr   pip.commands.listr   pip.commands.checkr	   pip.commands.searchr
   pip.commands.showr   pip.commands.installr   pip.commands.uninstallr   pip.commands.wheelr   r   r   r   r   r    r   r   r   r   r   <module>   sP   												