????

Your IP : 216.73.216.152


Current Path : /proc/self/root/proc/self/root/lib/python2.7/site-packages/pip/_internal/operations/
Upload File :
Current File : //proc/self/root/proc/self/root/lib/python2.7/site-packages/pip/_internal/operations/check.pyc

�
}�\]c@s�dZddlZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
eje�Ze
r9dd	lmZdd
lmZmZmZmZmZmZmZeedfZeeefZeeeefZeeeefZeeeefZ eee fZ!neddd
g�Z"d�Z#dd�Z%d�Z&d�Z'd�Z(dS(s'Validation of dependencies of packages
i����N(t
namedtuple(tcanonicalize_name(tRequirementParseError(t)make_distribution_for_install_requirement(tget_installed_distributions(tMYPY_CHECK_RUNNING(tInstallRequirement(tAnytCallabletDicttOptionaltSettTupletListtPackageDetailstversiontrequirescKs�|ikr#itd6dd6}ni}t}xrt|�D]d}t|j�}y t|j|j��||<Wq<tk
r�}tj	d||�t
}q<Xq<W||fS(s8Converts a list of distributions into a PackageSet.
    t
local_onlytskips%Error parsing requirements for %s: %s((tFalseRRtproject_nameRRRRtloggingtwarningtTrue(tkwargstpackage_settproblemstdisttnamete((s=/tmp/pip-install-ewDPok/pip/pip/_internal/operations/check.pyt!create_package_set_from_installed$s cCsa|dkrd�}nt�}t�}x*|D]"}t�}t�}||�r[q1nx�||jD]�}t|j�}||kr�t}	|jdk	r�|jj�}	n|	ri|j	||f�qiqin||j
}
|jj|
dt�si|j	||
|f�qiqiW|r4t
|dt�||<n|r1t
|dt�||<q1q1W||fS(s�Check if a package set is consistent

    If should_ignore is passed, it should be a callable that takes a
    package name and returns a boolean.
    cSstS(N(R(R((s=/tmp/pip-install-ewDPok/pip/pip/_internal/operations/check.pyt
should_ignoreAstprereleasestkeyN(tNonetdicttsetRRRRtmarkertevaluatetaddRt	specifiertcontainstsortedtstr(RRtmissingtconflictingtpackage_nametmissing_depstconflicting_depstreqRtmissedR((s=/tmp/pip-install-ewDPok/pip/pip/_internal/operations/check.pytcheck_package_set9s4		
		
csLt�\}}t||�}t||��|t|d�fd��fS(seFor checking if the dependency graph would be consistent after     installing given requirements
    Rcs
|�kS(N((R(t	whitelist(s=/tmp/pip-install-ewDPok/pip/pip/_internal/operations/check.pyt<lambda>xs(Rt_simulate_installation_oft_create_whitelistR3(t
to_installRt_twould_be_installed((R4s=/tmp/pip-install-ewDPok/pip/pip/_internal/operations/check.pytcheck_install_conflictshscCsnt�}x^|D]V}t|�}|j�}t|j�}t|j|j��||<|j|�qW|S(sBComputes the version of packages after installing to_install.
    (	R$Rtget_pkg_resources_distributionRR!RRRR'(R8Rt	installedtinst_reqt
abstract_distRR((s=/tmp/pip-install-ewDPok/pip/pip/_internal/operations/check.pyR6}s	
cCsqt|�}x^|D]V}||kr+qnx;||jD],}t|j�|kr9|j|�Pq9q9WqW|S(N(R$RRRR'(R:Rtpackages_affectedR.R1((s=/tmp/pip-install-ewDPok/pip/pip/_internal/operations/check.pyR7�s

()t__doc__RtcollectionsRtpip._vendor.packaging.utilsRtpip._vendor.pkg_resourcesRtpip._internal.distributionsRtpip._internal.utils.miscRtpip._internal.utils.typingRt	getLoggert__name__tloggertpip._internal.req.req_installRttypingRRR	R
RRR
R+t
PackageSettMissingtConflictingtMissingDicttConflictingDicttCheckResultRRR"R3R;R6R7(((s=/tmp/pip-install-ewDPok/pip/pip/_internal/operations/check.pyt<module>s.4	/