3
zYðiÄ  ã               @   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   s:   | rt ttƒ}ntjƒ }x|D ]\}}||jfV  qW d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-ue6tjl93/pip/pip/commands/__init__.pyÚget_summaries4   s
    r   c             C   s6   ddl m} | jƒ } || tjƒ ƒ}|r.|d S dS d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                s(   yˆ j | d ƒS  tk
r"   dS X d S )Né   éÿ   )ÚindexÚ
ValueError)Úkey)Úorderr   r   ÚkeyfnO   s    z_sort_commands.<locals>.keyfn)r%   )Úsortedr   )Úcmddictr&   r'   r   )r&   r   r   N   s    r   N)T)!Ú__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   

