ok

Mini Shell

Direktori : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyo

�
x�_c@s_ddlZddlZddlmZddlmZmZddlmZddl	m
Z
ddlmZm
Z
ddlmZmZddlmZmZdd	lmZdd
lmZddlmZmZddlmZdd
lmZddlm Z m!Z!er�ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(ddl	m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/ddlm0Z0ddl1m2Z2e(d&Z3nej4e5�Z6d�Z7d�Z8d�Z9de fd��YZ:de:fd��YZ;de:fd ��YZ<de fd!��YZ=d"e fd#��YZ>d$e fd%��YZ?dS('i����N(tsuppress(tInvalidSpecifiertSpecifierSet(tcanonicalize_name(tVersion(t	HashErrortMetadataInconsistent(tHTTPRangeRequestUnsupportedtdist_from_wheel_url(tinstall_req_from_editabletinstall_req_from_line(tInstallRequirement(t
indent_log(tdist_is_editabletnormalize_version_info(tget_requires_python(tMYPY_CHECK_RUNNINGi(t	Candidatetformat_name(tAnyt	FrozenSettIterabletOptionaltTupletUnion(t_BaseVersion(tDistribution(tAbstractDistribution(tLink(tRequirement(tFactorytAlreadyInstalledCandidatetEditableCandidatet
LinkCandidatecCs�|jrt|j�}n	|j}t|d|jd|jd|jd|jd|jdt	d|j
d|jd	|j��}|j
|_
||_|S(
Nt
user_suppliedt
comes_fromt
use_pep517tisolatedt
constrainttoptionstinstall_optionstglobal_optionsthashes(treqtstrturlR
R"R#R$R%R&tdictR(R)thash_optionst
original_linktlink(R1ttemplatetlinetireq((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pytmake_install_req_from_link0s"										cCs^t|jd|jd|jd|jd|jd|jdtd|jd|j	d	|j
��S(
NR"R#R$R%R&R'R(R)R*(R	R-R"R#R$R%R&R.R(R)R/(R1R2((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pytmake_install_req_from_editableIs								cCs�t|j�}|jr*t|j�}n9|jrNdj||jj�}ndj||j�}t|d|j	d|j
d|jd|jd|j
dtd	|jd
|jd|j��}||_|S(Ns{} @ {}s{}=={}R"R#R$R%R&R'R(R)R*(Rtproject_nameR+R,R1tformatR-tparsed_versionR
R"R#R$R%R&R.R(R)R/tsatisfied_by(tdistR2R7R3R4((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pytmake_install_req_from_dist[s&										t"_InstallRequirementBackedCandidatecBs�eZdZeZddd�Zd�Zd�Zd�Z	d�Z
ed��Zed��Z
ed��Zd	�Zd
�Zd�Zd�Zd
�Zed��Zd�Zd�Zd�ZRS(s�A candidate backed by an ``InstallRequirement``.

    This represents a package request with the target not being already
    in the environment, and needs to be fetched and installed. The backing
    ``InstallRequirement`` is responsible for most of the leg work; this
    class exposes appropriate information to the resolver.

    :param link: The link passed to the ``InstallRequirement``. The backing
        ``InstallRequirement`` will use this link to fetch the distribution.
    :param source_link: The link this candidate "originates" from. This is
        different from ``link`` when the link is found in the wheel cache.
        ``link`` would point to the wheel cache, while this points to the
        found remote link (e.g. from pypi.org).
    cCsL||_||_||_||_||_||_d|_t|_	dS(N(
t_linkt_source_linkt_factoryt_ireqt_namet_versiontNonet_disttFalset	_prepared(tselfR1tsource_linkR4tfactorytnametversion((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyt__init__�s
							cCs%djd|jjdt|j��S(Ns{class_name}({link!r})t
class_nameR1(R8t	__class__t__name__R,R>(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyt__repr__�s	cCst|j|jf�S(N(thashROR>(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyt__hash__�scCs&t||j�r"|j|jkStS(N(t
isinstanceROR>RF(RHtother((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyt__eq__�scCs|j|�S(N(RV(RHRU((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyt__ne__�scCs|jS(N(R?(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRI�scCs.|jdkr't|jj�|_n|jS(s:The normalised name of the project the candidate refers toN(RBRDRR;R7(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRK�scCs(|jdkr!|jj|_n|jS(N(RCRDR;R9(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRL�scCs4dj|j|j|jjr*|jjn|j�S(Ns{} {} (from {})(R8RKRLR>tis_filet	file_path(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pytformat_for_error�scCstd��dS(NsOverride in subclass(tNotImplementedError(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyt_prepare_abstract_distribution�scCs�|j}t|j�}|jdk	rQ|j|krQt|jd|j��n|j}|jdk	r�|j|kr�t|jd|j	��ndS(s:Check for consistency of project name and version of dist.RKRLN(
RERR7RBRDRRAR9RCRL(RHR;RKRL((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyt_check_metadata_consistency�s		cCsh|jr
dSy|j�}Wn"tk
rA}|j|_�nX|j�|_|j�t|_dS(N(	RGR\RRAR+tget_pkg_resources_distributionRER]tTrue(RHt
abstract_distte((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyt_prepare�s	
cCs|jj}|jj}|jjo.|jj}|r�|r�|jr�tjd|j	j
pb|j	�t��{tt
��htjd|j|j�|jjjdd�d}|jj}t|j||�|_|j�WdQXWdQXn|jdkr|j�ndS(s-Fetch metadata, using lazy wheel if possible.s
Collecting %ss+Obtaining dependency information from %s %st#iiN(R@tpreparertuse_lazy_wheelR>tis_wheelRXtrequire_hashestloggertinfoRAR+RRRRBRCR-tsplitt
downloadert_sessionRRER]RDRb(RHRdRetremote_wheelR-tsession((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyt_fetch_metadata�s 

cCs#|jdkr|j�n|jS(N(RERDRo(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR;s
cCsrt|j�}|dkrdSyt|�}Wn0tk
ra}d}tj||j|�dSX|jj	|�S(Ns-Package %r has an invalid Requires-Python: %s(
RR;RDRRRhtwarningRKR@t make_requires_python_requirement(RHtrequires_pythontspecRatmessage((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyt_get_requires_python_dependencysccsX|r|jj�nd}x+|D]#}|jjt|�|j�Vq"W|j�VdS(N((R;trequiresR@tmake_requirement_from_specR,RARu(RHt
with_requiresRvtr((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pytiter_dependenciess
!cCs|j�|jS(N(RbRA(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pytget_install_requirements
N(RPt
__module__t__doc__RFtis_installedRDRMRQRSRVRWtpropertyRIRKRLRZR\R]RbRoR;RuRzR{(((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR=us(							
			
	cBs&eZeZddd�Zd�ZRS(c	Cs�|}|j||�}|dk	rCtjd|j�|j}nt||�}|dk	r�|jr�|j|jkr�t|_	nt
t|�jd|d|d|d|d|d|�dS(NsUsing cached wheel link: %sR1RIR4RJRKRL(
tget_wheel_cache_entryRDRhtdebugR1R5t
persistentR0R_toriginal_link_is_in_wheel_cachetsuperR!RM(	RHR1R2RJRKRLRItcache_entryR4((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRM%s"		cCs|jjj|jdt�S(Ntparallel_builds(R@Rdtprepare_linked_requirementRAR_(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR\CsN(RPR|RFtis_editableRDRMR\(((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR!"scBs&eZeZddd�Zd�ZRS(c
CsDtt|�jd|d|dt||�d|d|d|�dS(NR1RIR4RJRKRL(R�R RMR6(RHR1R2RJRKRL((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRMMs	cCs|jjj|j�S(N(R@Rdtprepare_editable_requirementRA(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR\_sN(RPR|R_R�RDRMR\(((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR JscBs�eZeZdZd�Zd�Zd�Zd�Z	d�Z
ed��Zed��Z
ed��Zd�Zd	�Zd
�ZRS(cCsD||_t||�|_||_d}|jj|j|�dS(Nsalready satisfied(R;R<RAR@Rdtprepare_installed_requirement(RHR;R2RJtskip_reason((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRMhs
		cCsdjd|jjd|j�S(Ns{class_name}({distribution!r})RNtdistribution(R8RORPR;(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRQzs	cCst|j|j|jf�S(N(RRRORKRL(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRS�scCs8t||j�r4|j|jko3|j|jkStS(N(RTRORKRLRF(RHRU((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRV�s"cCs|j|�S(N(RV(RHRU((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRW�scCst|jj�S(N(RR;R7(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRK�scCs
|jjS(N(R;R9(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRL�scCs
t|j�S(N(R
R;(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR��scCsdj|j|j�S(Ns{} {} (Installed)(R8RKRL(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRZ�sccsE|s
dSx4|jj�D]#}|jjt|�|j�VqWdS(N(R;RvR@RwR,RA(RHRxRy((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRz�scCsdS(N(RD(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR{�sN(RPR|R_R~RDRIRMRQRSRVRWRRKRLR�RZRzR{(((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRds							tExtrasCandidatecBs�eZdZd�Zd�Zd�Zd�Zd�Zed��Z	ed��Z
d�Zed	��Zed
��Z
ed��Zd�Zd
�ZRS(s�A candidate that has 'extras', indicating additional dependencies.

    Requirements can be for a project with dependencies, something like
    foo[extra].  The extras don't affect the project/version being installed
    directly, but indicate that we need additional dependencies. We model that
    by having an artificial ExtrasCandidate that wraps the "base" candidate.

    The ExtrasCandidate differs from the base in the following ways:

    1. It has a unique name, of the form foo[extra]. This causes the resolver
       to treat it as a separate node in the dependency graph.
    2. When we're getting the candidate's dependencies,
       a) We specify that we want the extra dependencies as well.
       b) We add a dependency on the base candidate.
          See below for why this is needed.
    3. We return None for the underlying InstallRequirement, as the base
       candidate will provide it, and we don't want to end up with duplicates.

    The dependency on the base candidate is needed so that the resolver can't
    decide that it should recommend foo[extra1] version 1.0 and foo[extra2]
    version 2.0. Having those candidates depend on foo=1.0 and foo=2.0
    respectively forces the resolver to recognise that this is a conflict.
    cCs||_||_dS(N(tbasetextras(RHR�R�((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRM�s	cCs(djd|jjd|jd|j�S(Ns.{class_name}(base={base!r}, extras={extras!r})RNR�R�(R8RORPR�R�(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRQ�s		cCst|j|jf�S(N(RRR�R�(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRS�scCs8t||j�r4|j|jko3|j|jkStS(N(RTROR�R�RF(RHRU((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRV�s"cCs|j|�S(N(RV(RHRU((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRW�scCst|jj|j�S(s:The normalised name of the project the candidate refers to(RR�RKR�(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRK�scCs
|jjS(N(R�RL(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRL�scCs+dj|jj�djt|j���S(Ns{} [{}]s, (R8R�RZtjointsortedR�(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRZ�scCs
|jjS(N(R�R~(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR~�scCs
|jjS(N(R�R�(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR��scCs
|jjS(N(R�RI(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRIsccs�|jj}|j|j�V|s'dS|jj|jjj�}|jj|jjj�}x3t|�D]%}tj	d|jj
|j|�qjWxL|jjj|�D]5}|j
t|�|jj|�}|r�|Vq�q�WdS(Ns%%s %s does not provide the extra '%s'(R�R@tmake_requirement_from_candidateR�tintersectionR;t
differenceR�RhRpRKRLRvRwR,RA(RHRxRJtvalid_extrastinvalid_extrastextraRytrequirement((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRzs"	cCsdS(N(RD(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR{%s(RPR|R}RMRQRSRVRWRRKRLRZR~R�RIRzR{(((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR��s								tRequiresPythonCandidatecBsVeZeZdZd�Zed��Zed��Z	d�Z
d�Zd�ZRS(cCsN|dk	rt|�}n
tjd }tdjd�|D���|_dS(Nit.css|]}t|�VqdS(N(R,(t.0tc((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pys	<genexpr>7s(RDRtsystversion_infoRR�RC(RHtpy_version_infoR�((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRM1s
cCsdS(Ns<Python from Requires-Python>((RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRK=scCs|jS(N(RC(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRLCscCsdj|j�S(Ns	Python {}(R8RL(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRZHscCsdS(N(((RHRx((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyRzLscCsdS(N(RD(RH((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR{PsN(
RPR|RFR~RDRIRMRRKRLRZRzR{(((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyR�-s			(sAlreadyInstalledCandidatesEditableCandidates
LinkCandidate(@tloggingR�tpip._vendor.contextlib2Rt pip._vendor.packaging.specifiersRRtpip._vendor.packaging.utilsRtpip._vendor.packaging.versionRtpip._internal.exceptionsRRt pip._internal.network.lazy_wheelRRtpip._internal.req.constructorsR	R
tpip._internal.req.req_installRtpip._internal.utils.loggingRtpip._internal.utils.miscR
Rtpip._internal.utils.packagingRtpip._internal.utils.typingRR�RRttypingRRRRRRRtpip._vendor.pkg_resourcesRtpip._internal.distributionsRtpip._internal.models.linkRRRJRt
BaseCandidatet	getLoggerRPRhR5R6R<R=R!R RR�R�(((s_/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/candidates.pyt<module>sH.
			�(K~

Zerion Mini Shell 1.0