JFIF$        dd7 

Viewing File: /usr/lib/python3.9/site-packages/pip/_internal/cli/__pycache__/base_command.cpython-39.opt-1.pyc

a

[��fn�@s<dZddlZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZmZm
Z
mZddlmZddlmZddlmZmZddlmZmZmZmZdd	lmZmZmZmZm Z m!Z!dd
l"m#Z#ddl$m%Z%m&Z&ddl'm(Z(m)Z)dd
l*m+Z,ddl*m-Z-m.Z.ddl/m0Z0dgZ1e�2e3�Z4Gdd�de�Z5dS)z(Base Command class, and related routines�N)�Values)�Any�Callable�List�Optional�Tuple)�
cmdoptions)�CommandContextMixIn)�ConfigOptionParser�UpdatingDefaultsHelpFormatter)�ERROR�PREVIOUS_BUILD_DIR_ERROR�
UNKNOWN_ERROR�VIRTUALENV_NOT_FOUND)�
BadCommand�CommandError�InstallationError�NetworkConnectionError�PreviousBuildDirError�UninstallationError)�check_path_owner)�BrokenStdoutLoggingError�
setup_logging)�get_prog�normalize_path)�TempDirectoryTypeRegistry)�global_tempdir_manager�tempdir_registry)�running_under_virtualenv�Commandcs�eZdZUdZeed<dZeed<deeedd��fdd�
Zdd	�d
d�Z	e
dd�d
d�Ze
eee
d�dd�Zeeee
eefd�dd�Zeee
d�dd�Zeee
d�dd�Z�ZS)r��usageF�ignore_require_venvN)�name�summary�isolated�returnc	s�t���||_||_t|jt��d|��t�d||j|d�|_	d|_
|j���d�}t�
|j	|�|_t�tj|j	�}|j	�|�|��dS)N� F)r!�prog�	formatterZadd_help_optionr#�descriptionr%z Options)�super�__init__r#r$r
r!rr�__doc__�parserr�
capitalize�optparseZOptionGroupZcmd_optsrZmake_option_groupZ
general_groupZadd_option_group�add_options)�selfr#r$r%Z
optgroup_nameZgen_opts��	__class__��B/usr/lib/python3.9/site-packages/pip/_internal/cli/base_command.pyr,.s*
�
�zCommand.__init__)r&cCsdS�Nr5)r2r5r5r6r1LszCommand.add_options)�optionsr&cCsdS)zf
        This is a no-op so that commands by default do not do the pip version
        check.
        Nr5)r2r8r5r5r6�handle_pip_version_checkOsz Command.handle_pip_version_check)r8�argsr&cCst�dSr7)�NotImplementedError)r2r8r:r5r5r6�runXszCommand.run�r:r&cCs|j�|�Sr7)r.�
parse_args�r2r:r5r5r6r>[szCommand.parse_argscCsXzH|���$|�|�Wd�Wt��S1s40YWt��n
t��0dSr7)Zmain_context�_main�loggingZshutdownr?r5r5r6�main_s
�zCommand.mainc	sB|�t��|_|�t��|�|�\}}|j|j|_t|j|j|j	d��|j
rZdtjd<|j
rrd�|j
�tjd<|jr�|js�t�s�t�d�t�t�|jr�t|j�|_t|j�s�t�d|j�d|_d|jvr�t�d	�td
tftd
tfd��fdd
�}z0|j�s||j�}n|j}|||�W|� |�S|� |�0dS)N)�	verbosity�no_colorZ
user_log_file�1ZPIP_NO_INPUTr'ZPIP_EXISTS_ACTIONz2Could not find an activated virtualenv (required).z�The directory '%s' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.z
2020-resolverz�--use-feature=2020-resolver no longer has any effect, since it is now the default dependency resolver in pip. This will become an error in pip 21.0..)�run_funcr&cs$t���ttd���fdd��}|S)Nr=cstz�|�}|WStyR}z,t�t|��tjddd�tWYd}~Sd}~0tttt	fy�}z,t�t|��tjddd�t
WYd}~Sd}~0t�y�}z*t�d|�tjddd�t
WYd}~Sd}~0t�yt
dtjd��tjk�rtjtjd�t
YSt�yJt�d�tjddd�t
YSt�yntjddd�tYS0dS)	NzException information:T)�exc_infoz%sz ERROR: Pipe to stdout was broken)�filezOperation cancelled by userz
Exception:)r�logger�critical�str�debugr
rrrrrrr�print�sys�stderrrA�DEBUG�	traceback�	print_exc�KeyboardInterrupt�
BaseExceptionr)r:�status�exc)�level_numberrFr5r6�exc_logging_wrapper�s@�
zLCommand._main.<locals>.intercepts_unhandled_exc.<locals>.exc_logging_wrapper)�	functools�wrapsr�int)rFrX�rW)rFr6�intercepts_unhandled_exc�s+z/Command._main.<locals>.intercepts_unhandled_exc)!�
enter_contextrrr>�verbose�quietrCrrD�logZno_input�os�environZ
exists_action�joinZrequire_venvr"rrIrJrN�exitrZ	cache_dirrrZwarningZfeatures_enabledrr[Z
debug_moder<r9)r2r:r8r]r<r5r\r6r@fsP�




�
�

�1

�z
Command._main)F)�__name__�
__module__�__qualname__r!rK�__annotations__r"�boolr,r1rr9rr[r<rr>rBr@�
__classcell__r5r5r3r6r*s
	 )6r-rYrAZlogging.configr0rbrNrQr�typingrrrrrZpip._internal.clirZ!pip._internal.cli.command_contextr	Zpip._internal.cli.parserr
rZpip._internal.cli.status_codesrr
rrZpip._internal.exceptionsrrrrrrZpip._internal.utils.filesystemrZpip._internal.utils.loggingrrZpip._internal.utils.miscrrZpip._internal.utils.temp_dirrZTempDirRegistryrrZpip._internal.utils.virtualenvr�__all__Z	getLoggerrfrIrr5r5r5r6�<module>s. 

Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk yP7U*omQIs,K`)6\G3t?pgjrmۛجwluGtfh9uyP0D;Uڽ"OXlif$)&|ML0Zrm1[HXPlPR0'G=i2N+0e2]]9VTPO׮7h(F*癈'=QVZDF,d߬~TX G[`le69CR(!S2!P <0x<!1AQ "Raq02Br#SCTb ?Ζ"]mH5WR7k.ۛ!}Q~+yԏz|@T20S~Kek *zFf^2X*(@8r?C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