Server IP : 85.214.239.14 / Your IP : 3.141.32.252 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /srv/modoboa/env/lib/python3.5/site-packages/pip/_internal/resolution/resolvelib/ |
Upload File : |
from pip._vendor.resolvelib.providers import AbstractProvider from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Any, Optional, Sequence, Tuple, Union from pip._internal.req.req_install import InstallRequirement from .base import Requirement, Candidate from .factory import Factory class PipProvider(AbstractProvider): def __init__( self, factory, # type: Factory ignore_dependencies, # type: bool ): # type: (...) -> None self._factory = factory self._ignore_dependencies = ignore_dependencies def get_install_requirement(self, c): # type: (Candidate) -> Optional[InstallRequirement] return c.get_install_requirement() def identify(self, dependency): # type: (Union[Requirement, Candidate]) -> str return dependency.name def get_preference( self, resolution, # type: Optional[Candidate] candidates, # type: Sequence[Candidate] information # type: Sequence[Tuple[Requirement, Candidate]] ): # type: (...) -> Any # Use the "usual" value for now return len(candidates) def find_matches(self, requirement): # type: (Requirement) -> Sequence[Candidate] return requirement.find_matches() def is_satisfied_by(self, requirement, candidate): # type: (Requirement, Candidate) -> bool return requirement.is_satisfied_by(candidate) def get_dependencies(self, candidate): # type: (Candidate) -> Sequence[Requirement] if self._ignore_dependencies: return [] return candidate.get_dependencies()