OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, base, extras) |
def | __str__ (self) |
def | __repr__ (self) |
def | __hash__ (self) |
def | __eq__ (self, other) |
def | project_name (self) |
def | name (self) |
def | version (self) |
def | format_for_error (self) |
def | is_installed (self) |
def | is_editable (self) |
def | source_link (self) |
def | iter_dependencies (self, with_requires) |
def | get_install_requirement (self) |
Data Fields | |
base | |
extras | |
A candidate that has 'extras', indicating additional dependencies. Requirements can be for a project with dependencies, something like foo[extra]. The extras don't affect the project/version being installed directly, but indicate that we need additional dependencies. We model that by having an artificial ExtrasCandidate that wraps the "base" candidate. The ExtrasCandidate differs from the base in the following ways: 1. It has a unique name, of the form foo[extra]. This causes the resolver to treat it as a separate node in the dependency graph. 2. When we're getting the candidate's dependencies, a) We specify that we want the extra dependencies as well. b) We add a dependency on the base candidate. See below for why this is needed. 3. We return None for the underlying InstallRequirement, as the base candidate will provide it, and we don't want to end up with duplicates. The dependency on the base candidate is needed so that the resolver can't decide that it should recommend foo[extra1] version 1.0 and foo[extra2] version 2.0. Having those candidates depend on foo=1.0 and foo=2.0 respectively forces the resolver to recognise that this is a conflict.
def __init__ | ( | self, | |
base, | |||
extras | |||
) |
def __eq__ | ( | self, | |
other | |||
) |
def __hash__ | ( | self | ) |
def __repr__ | ( | self | ) |
def __str__ | ( | self | ) |
def format_for_error | ( | self | ) |
Reimplemented from Candidate.
def get_install_requirement | ( | self | ) |
Reimplemented from Candidate.
def is_editable | ( | self | ) |
Reimplemented from Candidate.
def is_installed | ( | self | ) |
Reimplemented from Candidate.
def iter_dependencies | ( | self, | |
with_requires | |||
) |
Reimplemented from Candidate.
def name | ( | self | ) |
The normalised name of the project the candidate refers to
Reimplemented from Candidate.
def project_name | ( | self | ) |
The "project name" of the candidate. This is different from ``name`` if this candidate contains extras, in which case ``name`` would contain the ``[...]`` part, while this refers to the name of the project.
Reimplemented from Candidate.
def source_link | ( | self | ) |
Reimplemented from Candidate.
def version | ( | self | ) |
Reimplemented from Candidate.
base |
extras |