Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
pip._internal.resolution.legacy.resolver.Resolver Class Reference
Inheritance diagram for pip._internal.resolution.legacy.resolver.Resolver:
Inheritance graph
[legend]
Collaboration diagram for pip._internal.resolution.legacy.resolver.Resolver:
Collaboration graph
[legend]

Public Member Functions

None __init__ (self, RequirementPreparer preparer, PackageFinder finder, Optional[WheelCache] wheel_cache, InstallRequirementProvider make_install_req, bool use_user_site, bool ignore_dependencies, bool ignore_installed, bool ignore_requires_python, bool force_reinstall, str upgrade_strategy, Optional[Tuple[int,...]] py_version_info=None)
 
RequirementSet resolve (self, List[InstallRequirement] root_reqs, bool check_supported_wheels)
 
List[InstallRequirementget_installation_order (self, RequirementSet req_set)
 

Public Attributes

 preparer
 
 finder
 
 wheel_cache
 
 upgrade_strategy
 
 force_reinstall
 
 ignore_dependencies
 
 ignore_installed
 
 ignore_requires_python
 
 use_user_site
 

Protected Member Functions

Tuple[List[InstallRequirement], Optional[InstallRequirement]] _add_requirement_to_set (self, RequirementSet requirement_set, InstallRequirement install_req, Optional[str] parent_req_name=None, Optional[Iterable[str]] extras_requested=None)
 
bool _is_upgrade_allowed (self, InstallRequirement req)
 
None _set_req_to_reinstall (self, InstallRequirement req)
 
Optional[str] _check_skip_installed (self, InstallRequirement req_to_install)
 
Optional[Link_find_requirement_link (self, InstallRequirement req)
 
None _populate_link (self, InstallRequirement req)
 
BaseDistribution _get_dist_for (self, InstallRequirement req)
 
List[InstallRequirement_resolve_one (self, RequirementSet requirement_set, InstallRequirement req_to_install)
 

Protected Attributes

 _py_version_info
 
 _make_install_req
 

Static Protected Attributes

dict _allowed_strategies = {"eager", "only-if-needed", "to-satisfy-only"}
 

Detailed Description

Resolves which packages need to be installed/uninstalled to perform \
the requested operation without breaking the requirements of any package.

Member Function Documentation

◆ _add_requirement_to_set()

Tuple[List[InstallRequirement], Optional[InstallRequirement]] pip._internal.resolution.legacy.resolver.Resolver._add_requirement_to_set (   self,
RequirementSet  requirement_set,
InstallRequirement  install_req,
Optional[str]   parent_req_name = None,
Optional[Iterable[str]]   extras_requested = None 
)
protected
Add install_req as a requirement to install.

:param parent_req_name: The name of the requirement that needed this
    added. The name is used because when multiple unnamed requirements
    resolve to the same name, we could otherwise end up with dependency
    links that point outside the Requirements set. parent_req must
    already be added. Note that None implies that this is a user
    supplied requirement, vs an inferred one.
:param extras_requested: an iterable of extras used to evaluate the
    environment markers.
:return: Additional requirements to scan. That is either [] if
    the requirement is not applicable, or [install_req] if the
    requirement is applicable and has just been added.

◆ _check_skip_installed()

Optional[str] pip._internal.resolution.legacy.resolver.Resolver._check_skip_installed (   self,
InstallRequirement   req_to_install 
)
protected
Check if req_to_install should be skipped.

This will check if the req is installed, and whether we should upgrade
or reinstall it, taking into account all the relevant user options.

After calling this req_to_install will only have satisfied_by set to
None if the req_to_install is to be upgraded/reinstalled etc. Any
other value will be a dist recording the current thing installed that
satisfies the requirement.

Note that for vcs urls and the like we can't assess skipping in this
routine - we simply identify that we need to pull the thing down,
then later on it is pulled down and introspected to assess upgrade/
reinstalls etc.

:return: A text reason for why it was skipped, or None.

◆ _get_dist_for()

BaseDistribution pip._internal.resolution.legacy.resolver.Resolver._get_dist_for (   self,
InstallRequirement  req 
)
protected
Takes a InstallRequirement and returns a single AbstractDist \
representing a prepared variant of the same.

◆ _populate_link()

None pip._internal.resolution.legacy.resolver.Resolver._populate_link (   self,
InstallRequirement  req 
)
protected
Ensure that if a link can be found for this, that it is found.

Note that req.link may still be None - if the requirement is already
installed and not needed to be upgraded based on the return value of
_is_upgrade_allowed().

If preparer.require_hashes is True, don't use the wheel cache, because
cached wheels, always built locally, have different hashes than the
files downloaded from the index server and thus throw false hash
mismatches. Furthermore, cached wheels at present have undeterministic
contents due to file modification times.

◆ _resolve_one()

List[InstallRequirement] pip._internal.resolution.legacy.resolver.Resolver._resolve_one (   self,
RequirementSet  requirement_set,
InstallRequirement  req_to_install 
)
protected
Prepare a single requirements file.

:return: A list of additional InstallRequirements to also install.

◆ _set_req_to_reinstall()

None pip._internal.resolution.legacy.resolver.Resolver._set_req_to_reinstall (   self,
InstallRequirement  req 
)
protected
Set a requirement to be installed.

◆ get_installation_order()

List[InstallRequirement] pip._internal.resolution.legacy.resolver.Resolver.get_installation_order (   self,
RequirementSet   req_set 
)
Create the installation order.

The installation order is topological - requirements are installed
before the requiring thing. We break cycles at an arbitrary point,
and make no other guarantees.

Reimplemented from pip._internal.resolution.base.BaseResolver.

◆ resolve()

RequirementSet pip._internal.resolution.legacy.resolver.Resolver.resolve (   self,
List[InstallRequirement root_reqs,
bool   check_supported_wheels 
)
Resolve what operations need to be done

As a side-effect of this method, the packages (and their dependencies)
are downloaded, unpacked and prepared for installation. This
preparation is done by ``pip.operations.prepare``.

Once PyPI has static dependency metadata available, it would be
possible to move the preparation to become a step separated from
dependency resolution.

Reimplemented from pip._internal.resolution.base.BaseResolver.


The documentation for this class was generated from the following file: