Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
pip._internal.metadata.importlib._envs._DistributionFinder Class Reference

Public Member Functions

None __init__ (self)
 
Iterator[BaseDistributionfind (self, str location)
 
Iterator[BaseDistributionfind_linked (self, str location)
 
Iterator[BaseDistributionfind_eggs (self, str location)
 

Static Public Attributes

 FoundResult = Tuple[importlib.metadata.Distribution, Optional[BasePath]]
 

Protected Member Functions

Iterator[FoundResult] _find_impl (self, str location)
 
Iterator[BaseDistribution_find_eggs_in_dir (self, str location)
 
Iterator[BaseDistribution_find_eggs_in_zip (self, str location)
 

Detailed Description

Finder to locate distributions.

The main purpose of this class is to memoize found distributions' names, so
only one distribution is returned for each package name. At lot of pip code
assumes this (because it is setuptools's behavior), and not doing the same
can potentially cause a distribution in lower precedence path to override a
higher precedence one if the caller is not careful.

Eventually we probably want to make it possible to see lower precedence
installations as well. It's useful feature, after all.

Member Function Documentation

◆ _find_impl()

Iterator[FoundResult] pip._internal.metadata.importlib._envs._DistributionFinder._find_impl (   self,
str  location 
)
protected
Find distributions in a location.

◆ find()

Iterator[BaseDistribution] pip._internal.metadata.importlib._envs._DistributionFinder.find (   self,
str  location 
)
Find distributions in a location.

The path can be either a directory, or a ZIP archive.

◆ find_eggs()

Iterator[BaseDistribution] pip._internal.metadata.importlib._envs._DistributionFinder.find_eggs (   self,
str  location 
)
Find eggs in a location.

This actually uses the old *pkg_resources* backend. We likely want to
deprecate this so we can eventually remove the *pkg_resources*
dependency entirely. Before that, this should first emit a deprecation
warning for some versions when using the fallback since importing
*pkg_resources* is slow for those who don't need it.

◆ find_linked()

Iterator[BaseDistribution] pip._internal.metadata.importlib._envs._DistributionFinder.find_linked (   self,
str  location 
)
Read location in egg-link files and return distributions in there.

The path should be a directory; otherwise this returns nothing. This
follows how setuptools does this for compatibility. The first non-empty
line in the egg-link is read as a path (resolved against the egg-link's
containing directory if relative). Distributions found at that linked
location are returned.

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