OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, link_collector, target_python, allow_yanked, format_control=None, candidate_prefs=None, ignore_requires_python=None) |
def | create (cls, link_collector, selection_prefs, target_python=None) |
def | target_python (self) |
def | search_scope (self) |
def | search_scope (self, search_scope) |
def | find_links (self) |
def | index_urls (self) |
def | trusted_hosts (self) |
def | allow_all_prereleases (self) |
def | set_allow_all_prereleases (self) |
def | prefer_binary (self) |
def | set_prefer_binary (self) |
def | make_link_evaluator (self, project_name) |
def | get_install_candidate (self, link_evaluator, link) |
def | evaluate_links (self, link_evaluator, links) |
def | process_project_url (self, project_url, link_evaluator) |
def | find_all_candidates (self, project_name) |
def | make_candidate_evaluator (self, project_name, specifier=None, hashes=None) |
def | find_best_candidate (self, project_name, specifier=None, hashes=None) |
def | find_requirement (self, req, upgrade) |
Data Fields | |
format_control | |
Static Public Attributes | |
maxsize | |
This finds packages. This is meant to match easy_install's technique for looking for packages, by reading pages and looking for appropriate links.
def __init__ | ( | self, | |
link_collector, | |||
target_python, | |||
allow_yanked, | |||
format_control = None , |
|||
candidate_prefs = None , |
|||
ignore_requires_python = None |
|||
) |
This constructor is primarily meant to be used by the create() class method and from tests. :param format_control: A FormatControl object, used to control the selection of source packages / binary packages when consulting the index and links. :param candidate_prefs: Options to use when creating a CandidateEvaluator object.
def allow_all_prereleases | ( | self | ) |
def create | ( | cls, | |
link_collector, | |||
selection_prefs, | |||
target_python = None |
|||
) |
Create a PackageFinder. :param selection_prefs: The candidate selection preferences, as a SelectionPreferences object. :param target_python: The target Python interpreter to use when checking compatibility. If None (the default), a TargetPython object will be constructed from the running Python.
def evaluate_links | ( | self, | |
link_evaluator, | |||
links | |||
) |
Convert links that are candidates to InstallationCandidate objects.
def find_all_candidates | ( | self, | |
project_name | |||
) |
Find all available InstallationCandidate for project_name This checks index_urls and find_links. All versions found are returned as an InstallationCandidate list. See LinkEvaluator.evaluate_link() for details on which files are accepted.
def find_best_candidate | ( | self, | |
project_name, | |||
specifier = None , |
|||
hashes = None |
|||
) |
Find matches for the given project and specifier. :param specifier: An optional object implementing `filter` (e.g. `packaging.specifiers.SpecifierSet`) to filter applicable versions. :return: A `BestCandidateResult` instance.
def find_links | ( | self | ) |
def find_requirement | ( | self, | |
req, | |||
upgrade | |||
) |
Try to find a Link matching req Expects req, an InstallRequirement and upgrade, a boolean Returns a InstallationCandidate if found, Raises DistributionNotFound or BestVersionAlreadyInstalled otherwise
def get_install_candidate | ( | self, | |
link_evaluator, | |||
link | |||
) |
If the link is a candidate for install, convert it to an InstallationCandidate and return it. Otherwise, return None.
def index_urls | ( | self | ) |
def make_candidate_evaluator | ( | self, | |
project_name, | |||
specifier = None , |
|||
hashes = None |
|||
) |
Create a CandidateEvaluator object to use.
def make_link_evaluator | ( | self, | |
project_name | |||
) |
def prefer_binary | ( | self | ) |
def process_project_url | ( | self, | |
project_url, | |||
link_evaluator | |||
) |
def search_scope | ( | self | ) |
def search_scope | ( | self, | |
search_scope | |||
) |
def set_allow_all_prereleases | ( | self | ) |
def set_prefer_binary | ( | self | ) |
def target_python | ( | self | ) |
def trusted_hosts | ( | self | ) |
format_control |
|
static |