U
    KQh                     @   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   s6   | rt tt}nt }|D ]\}}||jfV  q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-tlro1kwj/pip/pip/commands/__init__.pyget_summaries4   s
    r   c                 C   s6   ddl m} |  } || t }|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 |  |dS )Nc                    s,   z  | d W S  tk
r&   Y dS X d 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)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>   sl               
