HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/lib/python3.9/site-packages/pip/_internal/operations/__pycache__/check.cpython-39.pyc
a

?�fx�@s,dZddlZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
e�e�Ze
r�dd	lmZdd
lmZmZmZmZmZmZmZeedfZeeefZeeeefZeeeefZeeeefZ eee fZ!eee!fZ"eddd
g�Z#dd�Z$ddd�Z%dd�Z&dd�Z'dd�Z(dS)z'Validation of dependencies of packages
�N)�
namedtuple)�canonicalize_name)�RequirementParseError)�)make_distribution_for_install_requirement)�get_installed_distributions)�MYPY_CHECK_RUNNING)�InstallRequirement)�Any�Callable�Dict�Optional�Set�Tuple�List�PackageDetails�version�requirescKs�|ikrddd�}i}d}tfi|��D]b}t|j�}zt|j|���||<Wq(ttfy�}zt�	d||�d}WYd}~q(d}~00q(||fS)z8Converts a list of distributions into a PackageSet.
    F�)Z
local_only�skipz%Error parsing requirements for %s: %sTN)
rr�project_namerrr�OSErrorr�loggerZwarning)�kwargs�package_setZproblems�dist�name�err�B/usr/lib/python3.9/site-packages/pip/_internal/operations/check.py�!create_package_set_from_installed%s

rcCs�i}i}|D]�}t�}t�}|r*||�r*q||jD]l}t|j�}||vrvd}	|jdurb|j��}	|	r4|�||f�q4||j}
|jj	|
dd�s4|�||
|f�q4|r�t
|td�||<|rt
|td�||<q||fS)z�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.
    TN)Zprereleases)�key)�setrrrZmarkerZevaluate�addrZ	specifier�contains�sorted�str)r�
should_ignoreZmissingZconflicting�package_nameZmissing_depsZconflicting_deps�reqrZmissedrrrr�check_package_set:s0



r(cs6t�\}}t||�}t||��|t|�fdd�d�fS)zeFor checking if the dependency graph would be consistent after     installing given requirements
    cs|�vS�Nr)r�Z	whitelistrr�<lambda>v�z)check_install_conflicts.<locals>.<lambda>)r%)r�_simulate_installation_of�_create_whitelistr()�
to_installr�_�would_be_installedrr*r�check_install_conflictsfs


��r2cCsXt�}|D]H}t|�}|��}|dus*J�t|j�}t|j|���||<|�|�q
|S)zBComputes the version of packages after installing to_install.
    N)	r rZget_pkg_resources_distributionrrrrrr!)r/rZ	installedZinst_reqZ
abstract_distrrrrrr-{s
r-cCsLt|�}|D]:}||vrq||jD] }t|j�|vr$|�|�qq$q|Sr))r rrrr!)r1rZpackages_affectedr&r'rrrr.�s
r.)N))�__doc__Zlogging�collectionsrZpip._vendor.packaging.utilsrZpip._vendor.pkg_resourcesrZpip._internal.distributionsrZpip._internal.utils.miscrZpip._internal.utils.typingrZ	getLogger�__name__rZpip._internal.req.req_installr�typingr	r
rrr
rrr$Z
PackageSetZMissingZConflictingZMissingDictZConflictingDictZCheckResultZConflictDetailsrrr(r2r-r.rrrr�<module>s0
$
,