AlkantarClanX12
Current Path : /usr/lib/python3.6/site-packages/pip/__pycache__/ |
Current File : //usr/lib/python3.6/site-packages/pip/__pycache__/basecommand.cpython-36.pyc |
3 �Pf�. � @ s, d Z ddlmZ ddlZddlZddlZddlZddlZddlm Z ddl mZ ddlm Z ddlmZ ddlmZmZmZmZmZ dd lmZ dd lmZmZ ddlmZmZ ddlmZm Z m!Z!m"Z"m#Z# dd l$m%Z%m&Z&m'Z' ddl(m)Z) ddl*m+Z+ dgZ,ej-e.�Z/G dd� de0�Z1G dd� de1�Z2dS )z(Base Command class, and related routines� )�absolute_importN)� cmdoptions)� PackageFinder)�running_under_virtualenv)� PipSession)� BadCommand�InstallationError�UninstallationError�CommandError�PreviousBuildDirError)�logging_dictConfig)�ConfigOptionParser�UpdatingDefaultsHelpFormatter)�InstallRequirement�parse_requirements)�SUCCESS�ERROR� UNKNOWN_ERROR�VIRTUALENV_NOT_FOUND�PREVIOUS_BUILD_DIR_ERROR)�deprecation�get_prog�normalize_path)�IndentingFormatter)�pip_version_check�Commandc @ s@ e Zd ZdZdZdZd Zddd�Zddd�Zd d � Z dd� Z dS )r NF�ext://sys.stdout�ext://sys.stderrc C sr | j dt� | jf t� d| j| j|d�}tf |�| _d| jj� }tj | j|�| _ tjtj | j�}| jj|� d S )Nz%s %sF)�usage�prog� formatterZadd_help_option�name�description�isolatedz %s Options)r r r! r �__doc__r �parser� capitalize�optparseZOptionGroupZcmd_optsr Zmake_option_groupZ general_groupZadd_option_group)�selfr# Z parser_kwZ optgroup_nameZgen_opts� r) �!/usr/lib/python3.6/basecommand.py�__init__) s zCommand.__init__c C s� t |jrttjj|jd��nd |d k r*|n|j|jd�}|jrF|j|_ |j rT|j |_|js^|rr|d k rj|n|j|_|jr�|j|jd�|_ |j |j_|S )N�http)�cache�retriesZinsecure_hosts)r, Zhttps)r � cache_dirr �os�path�joinr. � trusted_hostsZcertZverifyZclient_cert�timeout�proxyZproxies�no_inputZauthZ prompting)r( �optionsr. r4 �sessionr) r) r* �_build_sessionA s zCommand._build_sessionc C s | j j|�S )N)r% � parse_args)r( �argsr) r) r* r: e s zCommand.parse_argsc s� | j |�\}}|jr8|jdkr"d� |jdkr2d� qHd� n|jrDd� nd� � }|jrVd}tddd d tjd�idtd d�i� d| jd d gdd�dd| jd dd�dd|jp�dddd�d�|t t d dd|jr�dnd g��d�t� fdd�d2D ��d"�� tj d d� d3k�rtjd$tj� |j�r(d%tjd&<