|
def | __init__ (self, factory, constraints, ignore_dependencies, upgrade_strategy, user_requested) |
|
def | identify (self, requirement_or_candidate) |
|
"Preference" | get_preference (self, str identifier, Mapping[str, Candidate] resolutions, Mapping[str, Iterator[Candidate]] candidates, Mapping[str, Iterator["PreferenceInformation"]] information) |
|
Iterable[Candidate] | find_matches (self, str identifier, Mapping[str, Iterator[Requirement]] requirements, Mapping[str, Iterator[Candidate]] incompatibilities) |
|
def | is_satisfied_by (self, requirement, candidate) |
|
def | get_dependencies (self, candidate) |
|
Pip's provider implementation for resolvelib.
:params constraints: A mapping of constraints specified by the user. Keys
are canonicalized project names.
:params ignore_dependencies: Whether the user specified ``--no-deps``.
:params upgrade_strategy: The user-specified upgrade strategy.
:params user_requested: A set of canonicalized package names that the user
supplied for pip to install/upgrade.
"Preference" get_preference |
( |
|
self, |
|
|
str |
identifier, |
|
|
Mapping[str, Candidate] |
resolutions, |
|
|
Mapping[str, Iterator[Candidate]] |
candidates, |
|
|
Mapping[str, Iterator["PreferenceInformation"]] |
information |
|
) |
| |
Produce a sort key for given requirement based on preference.
The lower the return value is, the more preferred this group of
arguments is.
Currently pip considers the followings in order:
* Prefer if any of the known requirements points to an explicit URL.
* If equal, prefer if any requirements contain ``===`` and ``==``.
* If equal, prefer if requirements include version constraints, e.g.
``>=`` and ``<``.
* If equal, prefer user-specified (non-transitive) requirements, and
order user-specified requirements by the order they are specified.
* If equal, order alphabetically for consistency (helps debuggability).