î
Ó^ÝVa  ã               @   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 i e e j 6e e j 6e
 e
 j 6e e j 6e e j 6e e j 6e e j 6e e j 6e e j 6e e j 6e e j 6Z 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)Ú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-9m6vxulb/pip/pip/commands/__init__.pyÚget_summaries1   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   ÚkeyfnL   s    z_sort_commands.<locals>.keyfnr$   )Úsortedr   )Úcmddictr%   r&   r   )r%   r   r   K   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.searchr	   Úpip.commands.showr
   Úpip.commands.installr   Úpip.commands.uninstallr   Úpip.commands.wheelr   r   r   r   r   r   r   r   r   r   r   Ú<module>   sL   









	