Hacked By AnonymousFox

Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyc

�
�Rec@sdZddlZddlZddlmZddlmZddlmZddl	m
Z
mZmZm
Z
mZddlmZddlmZdd	lmZdd
lmZddlmZddlmZmZdd
lmZddlmZmZddl m!Z!e!r�ddl"m#Z#m$Z$m%Z%m&Z&m'Z'ddl(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddlm4Z4ddlm5Z5e#e6e$e4fZ7nej8e9�Z:e;d�Z<defd��YZ=dS(syDependency Resolution

The dependency resolution in pip is performed as follows:

for top-level requirements:
    a. only one spec allowed per project, regardless of conflicts or not.
       otherwise a "double requirement" exception is raised
    b. they override sub-dependency requirements.
for sub-dependencies
    a. "first found, wins" (where the order is breadth first)
i����N(tdefaultdict(tchain(t
specifiers(tBestVersionAlreadyInstalledtDistributionNotFoundt	HashErrort
HashErrorstUnsupportedPythonVersion(tcheck_invalid_constraint_type(tRequirementSet(tBaseResolver(t
get_supported(t
indent_log(tdist_in_usersitetnormalize_version_info(tdist_in_install_path(tcheck_requires_pythontget_requires_python(tMYPY_CHECK_RUNNING(tDefaultDicttListtOptionaltSettTuple(t
pkg_resources(t
WheelCache(tAbstractDistribution(t
PackageFinder(tLink(tRequirementPreparer(tInstallRequirement(tInstallRequirementProvidercCs�t|�}yt|d|�}Wn-tjk
rQ}tjd|j|�dSX|r\dSdjtt	|��}|r�tj
d|j||�dStdj|j||���dS(s�
    Check whether the given Python version is compatible with a distribution's
    "Requires-Python" value.

    :param version_info: A 3-tuple of ints representing the Python
        major-minor-micro version to check.
    :param ignore_requires_python: Whether to ignore the "Requires-Python"
        value if the given Python version isn't compatible.

    :raises UnsupportedPythonVersion: When the given Python version isn't
        compatible.
    tversion_infos-Package %r has an invalid Requires-Python: %sNt.sBIgnoring failed Requires-Python check for package %r: %s not in %rs8Package {!r} requires a different Python: {} not in {!r}(
RRRtInvalidSpecifiertloggertwarningtproject_nametjointmaptstrtdebugRtformat(tdistR tignore_requires_pythontrequires_pythont
is_compatibletexctversion((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyt_check_dist_requires_python=s(
tResolvercBszeZdZdddhZdd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�ZRS(s�Resolves which packages need to be installed/uninstalled to perform     the requested operation without breaking the requirements of any package.
    teagersonly-if-neededsto-satisfy-onlycCs�tt|�j�|
|jks(t�|dkrDtjd }nt|�}||_	||_
||_||_|
|_
|	|_||_||_||_||_||_tt�|_dS(Ni(tsuperR2t__init__t_allowed_strategiestAssertionErrortNonetsysR Rt_py_version_infotpreparertfindertwheel_cachetupgrade_strategytforce_reinstalltignore_dependenciestignore_installedR,t
use_user_sitet_make_install_reqRtlistt_discovered_dependencies(tselfR;R<R=tmake_install_reqRBR@RAR,R?R>tpy_version_info((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyR5ts"											cCs�td|�}x1|D])}|jr2t|�n|j|�qWg}t�}xct|j|�D]O}y|j|j||��Wqet	k
r�}||_
|j|�qeXqeW|r�|�n|S(s�Resolve what operations need to be done

        As a side-effect of this method, the packages (and their dependencies)
        are downloaded, unpacked and prepared for installation. This
        preparation is done by ``pip.operations.prepare``.

        Once PyPI has static dependency metadata available, it would be
        possible to move the preparation to become a step separated from
        dependency resolution.
        tcheck_supported_wheels(R	t
constraintRtadd_requirementRRtall_requirementstextendt_resolve_oneRtreqtappend(RFt	root_reqsRItrequirement_setROtdiscovered_reqsthash_errorsR/((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pytresolve�s"	
	
			cCsO|jdkrtS|jdkr&tS|jdks;t�|jpJ|jSdS(Nsto-satisfy-onlyR3sonly-if-needed(R>tFalsetTrueR7t
user_suppliedRJ(RFRO((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyt_is_upgrade_allowed�scCsA|jst|j�r4t|j�r4t|_nd|_dS(s4
        Set a requirement to be installed.
        N(RBR
tsatisfied_byRRWtshould_reinstallR8(RFRO((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyt_set_req_to_reinstall�s

cCs�|jr
dS|j|j�|js*dS|jrD|j|�dS|j|�sj|jdkrfdSdS|j	s�y|j
j|dt�Wq�t
k
r�dStk
r�q�Xn|j|�dS(sCheck if req_to_install should be skipped.

        This will check if the req is installed, and whether we should upgrade
        or reinstall it, taking into account all the relevant user options.

        After calling this req_to_install will only have satisfied_by set to
        None if the req_to_install is to be upgraded/reinstalled etc. Any
        other value will be a dist recording the current thing installed that
        satisfies the requirement.

        Note that for vcs urls and the like we can't assess skipping in this
        routine - we simply identify that we need to pull the thing down,
        then later on it is pulled down and introspected to assess upgrade/
        reinstalls etc.

        :return: A text reason for why it was skipped, or None.
        sonly-if-neededs#already satisfied, skipping upgradesalready satisfiedtupgradesalready up-to-dateN(RAR8tcheck_if_existsRBRZR?R\RYR>tlinkR<tfind_requirementRWRR(RFtreq_to_install((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyt_check_skip_installed�s*			
	


cCs{|j|�}|jj||�}|s.dS|j}|jrw|jpLd}djd|d|�}tj	|�n|S(Ns<none given>uqThe candidate selected for download or install is a yanked version: {candidate}
Reason for being yanked: {reason}t	candidatetreason(
RYR<R`R8R_t	is_yankedt
yanked_reasonR*R#R$(RFROR]tbest_candidateR_Rdtmsg((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyt_find_requirement_links			cCs�|jdkr$|j|�|_n|jdks?|jjrCdS|jjd|jd|jdt��}|dk	r�t	j
d|j�|j|jkr�|jr�t
|_n|j|_ndS(sfEnsure that if a link can be found for this, that it is found.

        Note that req.link may still be None - if the requirement is already
        installed and not needed to be upgraded based on the return value of
        _is_upgrade_allowed().

        If preparer.require_hashes is True, don't use the wheel cache, because
        cached wheels, always built locally, have different hashes than the
        files downloaded from the index server and thus throw false hash
        mismatches. Furthermore, cached wheels at present have undeterministic
        contents due to file modification times.
        NR_tpackage_nametsupported_tagssUsing cached wheel link: %s(R_R8RiR=R;trequire_hashestget_cache_entrytnameRR#R)t
original_linkt
persistentRWtoriginal_link_is_in_wheel_cache(RFROtcache_entry((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyt_populate_link%s		cCs�|jr|jj|�S|jdks.t�|j|�}|jrY|jj||�S|j|�|jj	|�}|j
s�|j|j�n|jr�|j
dkp�|jp�|j
p�|jjdk}|r�|j|�q�tjd|�n|S(szTakes a InstallRequirement and returns a single AbstractDist         representing a prepared variant of the same.
        sto-satisfy-onlytfiles<Requirement already satisfied (use --upgrade to upgrade): %sN(teditableR;tprepare_editable_requirementRZR8R7Rbtprepare_installed_requirementRstprepare_linked_requirementRAR^RBR>R?R_tschemeR\R#tinfo(RFROtskip_reasont
abstract_distt
should_modify((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyt_get_abstract_dist_forCs,			


				
c
	s��js�jrgSt�_�j��}|j�}t|d�jd�j�g�����fd�}t��"�j	�j
�s��js�t��j
�dd	�n�js{�jr�tjddj�j��ntt�j�t|j��}x!|D]}tjd||�qWtt|j�t�j�@�}x*|j|�D]}	||	d|�q^Wn�jr��jr�t�_nWd	QX�S(
sxPrepare a single requirements file.

        :return: A list of additional InstallRequirements to also install.
        R R,csv�jt|���}�j}�j|d|d|�\}}|re|re�j|j|�n�j|�dS(Ntparent_req_nametextras_requested(RCR(RnRKRERPRM(tsubreqR�tsub_install_reqRt
to_scan_againt
add_to_parent(t	more_reqsRaRRRF(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pytadd_req�s			

Rs!Installing extra requirements: %rt,s"%s does not provide the extra '%s'R�N(RJtpreparedRWR~tget_pkg_resources_distributionR1R:R,Rthas_requirementRnRXR7RKR8R@textrasR#R)R&tsortedtsetR$trequiresRuRZtsuccessfully_downloaded(
RFRRRaR|R+R�tmissing_requestedtmissingtavailable_requestedR�((R�RaRRRFs�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyRNusB
	

		
csOg�t������fd��x!|jj�D]}�|�q7W�S(s�Create the installation order.

        The installation order is topological - requirements are installed
        before the requiring thing. We break cycles at an arbitrary point,
        and make no other guarantees.
        csi|js|�krdS|jr&dS�j|�x"�j|jD]}�|�qDW�j|�dS(N(RZRJtaddRERnRP(ROtdep(tordertordered_reqstscheduleRF(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyR��s	
(R�trequirementstvalues(RFtreq_settinstall_req((R�R�R�RFs�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pytget_installation_order�s	
N(t__name__t
__module__t__doc__R6R8R5RURYR\RbRiRsR~RNR�(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyR2ms	&	
	
	5			2	Y(>R�tloggingR9tcollectionsRt	itertoolsRtpip._vendor.packagingRtpip._internal.exceptionsRRRRRtpip._internal.req.req_installRtpip._internal.req.req_setR	tpip._internal.resolution.baseR
t&pip._internal.utils.compatibility_tagsRtpip._internal.utils.loggingRtpip._internal.utils.miscR
RRtpip._internal.utils.packagingRRtpip._internal.utils.typingRttypingRRRRRtpip._vendorRtpip._internal.cacheRtpip._internal.distributionsRt"pip._internal.index.package_finderRtpip._internal.models.linkRt pip._internal.operations.prepareRRRR(tDiscoveredDependenciest	getLoggerR�R#RVR1R2(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.pyt<module>s:((-

Hacked By AnonymousFox1.0, Coded By AnonymousFox