Hacked By AnonymousFox

Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pyc

�
�Rec@sPdZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZmZmZmZddlm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&e&r�ddl'm(Z(ddl)m*Z*m+Z+m,Z,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5ddl6m7Z7ddl#m8Z8m9Z9nej:e;�Z<de
fd��YZ=dee=fd��YZ>e$j?e$j@e$jAgZBd�ZCd e>fd!��YZDdS("sContains the Command base classes that depend on PipSession.

The classes in this module are in a separate module so the commands not
needing download / PackageFinder capability don't unnecessarily import the
PackageFinder machinery and all its vendored dependencies, etc.
i����N(tpartial(t
cmdoptions(tCommand(tCommandContextMixIn(tCommandErrortPreviousBuildDirError(t
LinkCollector(t
PackageFinder(tSelectionPreferences(t
Downloader(t
PipSession(tRequirementPreparer(tinstall_req_from_editabletinstall_req_from_linet#install_req_from_parsed_requirementtinstall_req_from_req_string(tparse_requirements(tpip_self_version_check(t
tempdir_kinds(tMYPY_CHECK_RUNNING(tValues(tAnytListtOptionaltTuple(t
WheelCache(tTargetPython(tInstallRequirement(tRequirementTracker(tBaseResolver(t
TempDirectorytTempDirectoryTypeRegistrytSessionCommandMixincBs>eZdZd�Zed��Zd�Zddd�ZRS(sE
    A class mixin for command classes needing _build_session().
    cCs tt|�j�d|_dS(N(tsuperR t__init__tNonet_session(tself((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pyR"8scCsug}t|dt�sCt|dd�}|rC|j|�qCnt|dd�}|rk|j|�n|ptdS(s7Return a list of index urls from user-provided options.tno_indext	index_urltextra_index_urlsN(tgetattrtFalseR#tappendtextend(tclstoptionst
index_urlsturlturls((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pyt_get_index_urls=scCsI|jdkrB|j|j|��|_|jdk	sBt�n|jS(sGet a default-managed session.N(R$R#t
enter_contextt_build_sessiontAssertionError(R%R.((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pytget_default_sessionLsc
Cs%|js%tjj|j�s%t�td|jrLtjj|jd�ndd|dk	rd|n|jd|j	d|j
|��}|jr�|j|_n|j
r�|j
|_n|js�|r�|dk	r�|n|j|_n|jri|jd6|jd6|_n|j|j_|S(Ntcachethttptretriest
trusted_hostsR/thttps(t	cache_dirtostpathtisabsR5R
tjoinR#R9R:R2tcerttverifytclient_certttimeouttproxytproxiestno_inputtautht	prompting(R%R.R9RDtsession((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pyR4Ws$%'			!	
N(	t__name__t
__module__t__doc__R"tclassmethodR2R6R#R4(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pyR 3s
		tIndexGroupCommandcBseZdZd�ZRS(s�
    Abstract base class for commands with the index_group options.

    This also corresponds to the commands that permit the pip version check.
    cCspt|d�st�|js'|jr+dS|j|dddtd|j��}|�t||�WdQXdS(s�
        Do the pip version check if not disabled.

        This overrides the default behavior of not doing the check.
        R&NR9iRDi(thasattrR5tdisable_pip_version_checkR&R4tminRDR(R%R.RJ((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pythandle_pip_version_check�s(RKRLRMRS(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pyROscsd����fd�}|S(sNDecorator for common logic related to managing temporary
    directories.
    cSs%xtD]}|j|t�qWdS(N(tKEEPABLE_TEMPDIR_TYPESt
set_deleteR*(tregistrytt((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pytconfigure_tempdir_registry�s
csj|jdk	st�|jr.�|j�ny�|||�SWn!tk
re�|j��nXdS(N(ttempdir_registryR#R5tno_cleanR(R%R.targs(RXtfunc(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pytwrapper�s	

((R\R]((RXR\s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pytwith_cleanup�s	tRequirementCommandc
BsteZd�Zeddd��Zedeeeedddd��Zd�Z	ed��Z
ddd�ZRS(cOs3tt|�j||�|jjtj��dS(N(R!R_R"tcmd_optst
add_optionRRZ(R%R[tkw((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pyR"�sc
Cs|t|d|j�}|j}	|	dk	s0t�td|	d|jd|d|d|jd|d|d	|d
|jd|�
S(
sQ
        Create a RequirementPreparer instance for the given parameters.
        tprogress_bart	build_dirtsrc_dirtdownload_dirtwheel_download_dirtbuild_isolationtreq_trackert
downloadertfindertrequire_hashest
use_user_siteN(	R	RcR>R#R5RReRhRl(
ttemp_build_dirR.RiRJRkRmRfRgRjttemp_build_dir_path((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pytmake_requirement_preparer�s				sto-satisfy-onlyc
Csttd|jd|	�}d|jkr�ddl}|jjjjj	d|d|d|d	|d
|d|j
d|d
|d|d|d|
dd|jk�Sddl}|jjjjj	d|d|d|d	|d
|d|j
d|d
|d|d|d|
�S(sF
        Create a Resolver instance for the given parameters.
        tisolatedt
use_pep517s
2020-resolveri����NtpreparerRktwheel_cachetmake_install_reqRmtignore_dependenciestignore_installedtignore_requires_pythontforce_reinstalltupgrade_strategytpy_version_infot
lazy_wheels	fast-deps(
RRt
isolated_modetfeatures_enabledt,pip._internal.resolution.resolvelib.resolvert	_internalt
resolutiont
resolvelibtresolvertResolverRvt(pip._internal.resolution.legacy.resolvertlegacy(
RsRkR.RtRmRwRxRyRzRrR{Rutpip((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pyt
make_resolver�s@				cCsg}xh|jD]]}xTt|dtd|d|d|�D].}t|d|jdt�}|j|�q;WqWxB|D]:}	t|	dd|jd|j	dt�}|j|�qxWxB|j
D]7}	t|	dtd|jd|j	�}|j|�q�Wxk|jD]`}xWt|d|d|d|�D]7}t|d|jd|j	dt�}|j|�q*WqWt
d�|D��r�t|_n|p�|j
p�|jsi|jd	6}
|jr�td
jt|
ddj|j�����qtd
j|
���n|S(sS
        Parse command-line arguments into the corresponding requirements.
        t
constraintRkR.RJRqt
user_suppliedRrcss|]}|jVqdS(N(thas_hash_options(t.0treq((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pys	<genexpr>ZstnamesXYou must give at least one requirement to {name} (maybe you meant "pip {name} {links}"?)tlinkst sHYou must give at least one requirement to {name} (see "pip help {name}")N(tconstraintsRtTrueRR}R*R+R
R#Rrt	editablesRtrequirementstanyRlR�t
find_linksRtformattdictR@(R%R[R.RkRJR�tfilenamet
parsed_reqt
req_to_addR�topts((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pytget_requirements#s\
		
							'cCs/|j}|j�}|r+tj|�ndS(sE
        Trace basic information about the provided objects.
        N(tsearch_scopetget_formatted_locationstloggertinfo(RkR�t	locations((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pyttrace_basic_infoks	cCsatj|d|�}tdtd|jd|jd|jd|�}tjd|d|d	|�S(
s�
        Create a package finder appropriate to this requirement command.

        :param ignore_requires_python: Whether to ignore incompatible
            "Requires-Python" values in links. Defaults to False.
        R.tallow_yankedtformat_controltallow_all_prereleasest
prefer_binaryRxtlink_collectortselection_prefst
target_python(RtcreateRR�R�tpreR�R(R%R.RJR�RxR�R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pyt_build_package_finderws					N(RKRLR"tstaticmethodR#RpR*R�R�R�R�R�(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pyR_�s"	-	H(ERMtloggingR=t	functoolsRtpip._internal.cliRtpip._internal.cli.base_commandRt!pip._internal.cli.command_contextRtpip._internal.exceptionsRRtpip._internal.index.collectorRt"pip._internal.index.package_finderRt$pip._internal.models.selection_prefsRtpip._internal.network.downloadR	tpip._internal.network.sessionR
t pip._internal.operations.prepareRtpip._internal.req.constructorsRR
RRtpip._internal.req.req_fileRt!pip._internal.self_outdated_checkRtpip._internal.utils.temp_dirRtpip._internal.utils.typingRtoptparseRttypingRRRRtpip._internal.cacheRt"pip._internal.models.target_pythonRtpip._internal.req.req_installRtpip._internal.req.req_trackerRtpip._internal.resolution.baseRRRt	getLoggerRKR�R ROt	BUILD_ENVtEPHEM_WHEEL_CACHEt	REQ_BUILDRTR^R_(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/req_command.pyt<module>sF""L 	

Hacked By AnonymousFox1.0, Coded By AnonymousFox