3
���e�. � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl m
Z
ejde
d� yd dlZW n e
k
r~ Y nNX ejdkr�eedd �dk r�yd d lmZ W n e
efk
r� Y n
X ej� d d
lmZmZmZ d dlmZmZ d dlmZmZ d d
lmZmZm Z m!Z! d dl"m#Z#m$Z$ d dl%m&Z&m'Z' d dl%m(Z( d dl m)Z) d dl*Z+e+j,Z,dZ-ej.e/�Z0ejde)d� dd� Z1dd� Z2dd� Z3dd� Z4d dd�Z5G dd� de6�Z7e/dk�r�ej8e5� � dS )!� )�absolute_importN)�DependencyWarning�ignore)�category�darwinZOPENSSL_VERSION_NUMBERi )�securetransport)�InstallationError�CommandError�PipError)�get_installed_distributions�get_prog)�deprecation�dist_is_editable)�git� mercurial�
subversion�bazaar)�ConfigOptionParser�UpdatingDefaultsHelpFormatter)�
get_summaries�get_similar_commands)�
commands_dict)�InsecureRequestWarningz9.0.3c sZ dt jkrdS t jd j� dd� } tt jd �}y| |d � W n tk
rZ d� Y nX dd� t� D ��g }y�fd d�| D �d
}W n tk
r� d}Y nX t� }|�r�|dkr�tjd� |dkoԈ j d
� �rJg }� j
� }x<tdd�D ].}|jj |�r�|j| dd� kr�|j
|j� q�W |�rJx|D ]}t|� �q.W tjd� t| � }|dd� |jjD �7 }dd� | d|d � D ���fdd�|D �}� fdd�|D �}x�|D ](} | d
}
| d �r�|
d7 }
t|
� �q�W np� j d
��s� j d��r0dd� |jD �}|j
|j� dd� |D �}�dd� |D �7 �tdj� fdd��D ��� tjd� dS )z�Command and option completion for the main option parser (and options)
and its subcommands (and options).
Enable by sourcing one of the completion shell scripts (bash, zsh or fish).
ZPIP_AUTO_COMPLETENZ
COMP_WORDS� Z
COMP_CWORD� c S s g | ]\}}|�qS � r )�.0�cmdZsummaryr r �/usr/lib/python3.6/__init__.py�
<listcomp>U s z autocomplete.<locals>.<listcomp>c s g | ]}|� kr|�qS r r )r �w)�subcommandsr r r Y s r �helpZ uninstall�-T)Z
local_onlyc S s&