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

Public Member Functions

None __init__ (self, pkg_resources.Distribution dist)
 
BaseDistribution from_directory (cls, str directory)
 
BaseDistribution from_metadata_file_contents (cls, bytes metadata_contents, str filename, str project_name)
 
BaseDistribution from_wheel (cls, Wheel wheel, str name)
 
Optional[str] location (self)
 
Optional[str] installed_location (self)
 
Optional[str] info_location (self)
 
bool installed_by_distutils (self)
 
NormalizedName canonical_name (self)
 
DistributionVersion version (self)
 
bool is_file (self, InfoPath path)
 
Iterator[str] iter_distutils_script_names (self)
 
str read_text (self, InfoPath path)
 
Iterable[BaseEntryPointiter_entry_points (self)
 
Iterable[Requirementiter_dependencies (self, Collection[str] extras=())
 
Iterable[str] iter_provided_extras (self)
 
bool is_extra_provided (self, str extra)
 

Protected Member Functions

email.message.Message _metadata_impl (self)
 

Protected Attributes

 _dist
 

Additional Inherited Members

Member Function Documentation

◆ _metadata_impl()

email.message.Message pip._internal.metadata.pkg_resources.Distribution._metadata_impl (   self)
protected
:raises NoneMetadataError: if the distribution reports `has_metadata()`
    True but `get_metadata()` returns None.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ canonical_name()

NormalizedName pip._internal.metadata.pkg_resources.Distribution.canonical_name (   self)

◆ from_directory()

BaseDistribution pip._internal.metadata.pkg_resources.Distribution.from_directory (   cls,
str  directory 
)
Load the distribution from a metadata directory.

:param directory: Path to a metadata directory, e.g. ``.dist-info``.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ from_metadata_file_contents()

BaseDistribution pip._internal.metadata.pkg_resources.Distribution.from_metadata_file_contents (   cls,
bytes  metadata_contents,
str  filename,
str  project_name 
)
Load the distribution from the contents of a METADATA file.

This is used to implement PEP 658 by generating a "shallow" dist object that can
be used for resolution without downloading or building the actual dist yet.

:param metadata_contents: The contents of a METADATA file.
:param filename: File name for the dist with this metadata.
:param project_name: Name of the project this dist represents.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ from_wheel()

BaseDistribution pip._internal.metadata.pkg_resources.Distribution.from_wheel (   cls,
Wheel  wheel,
str  name 
)
Load the distribution from a given wheel.

:param wheel: A concrete wheel definition.
:param name: File name of the wheel.

:raises InvalidWheel: Whenever loading of the wheel causes a
    :py:exc:`zipfile.BadZipFile` exception to be thrown.
:raises UnsupportedWheel: If the wheel is a valid zip, but malformed
    internally.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ info_location()

Optional[str] pip._internal.metadata.pkg_resources.Distribution.info_location (   self)
Location of the .[egg|dist]-info directory or file.

Similarly to ``location``, a string value is not necessarily a
filesystem path. ``None`` means the distribution is created in-memory.

For a modern .dist-info installation on disk, this should be something
like ``{location}/{raw_name}-{version}.dist-info``.

Do not canonicalize this value with e.g. ``pathlib.Path.resolve()``. If
this is a symbolic link, we want to preserve the relative path between
it and other files in the distribution.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ installed_by_distutils()

bool pip._internal.metadata.pkg_resources.Distribution.installed_by_distutils (   self)
Whether this distribution is installed with legacy distutils format.

A distribution installed with "raw" distutils not patched by setuptools
uses one single file at ``info_location`` to store metadata. We need to
treat this specially on uninstallation.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ installed_location()

Optional[str] pip._internal.metadata.pkg_resources.Distribution.installed_location (   self)

◆ is_extra_provided()

bool pip._internal.metadata.pkg_resources.Distribution.is_extra_provided (   self,
str  extra 
)
Check whether an extra is provided by this distribution.

This is needed mostly for compatibility issues with pkg_resources not
following the extra normalization rules defined in PEP 685.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ is_file()

bool pip._internal.metadata.pkg_resources.Distribution.is_file (   self,
InfoPath  path 
)
Check whether an entry in the info directory is a file.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ iter_dependencies()

Iterable[Requirement] pip._internal.metadata.pkg_resources.Distribution.iter_dependencies (   self,
Collection[str]   extras = () 
)
Dependencies of this distribution.

For modern .dist-info distributions, this is the collection of
"Requires-Dist:" entries in distribution metadata.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ iter_distutils_script_names()

Iterator[str] pip._internal.metadata.pkg_resources.Distribution.iter_distutils_script_names (   self)
Find distutils 'scripts' entries metadata.

If 'scripts' is supplied in ``setup.py``, distutils records those in the
installed distribution's ``scripts`` directory, a file for each script.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ iter_entry_points()

Iterable[BaseEntryPoint] pip._internal.metadata.pkg_resources.Distribution.iter_entry_points (   self)

◆ iter_provided_extras()

Iterable[str] pip._internal.metadata.pkg_resources.Distribution.iter_provided_extras (   self)
Extras provided by this distribution.

For modern .dist-info distributions, this is the collection of
"Provides-Extra:" entries in distribution metadata.

The return value of this function is not particularly useful other than
display purposes due to backward compatibility issues and the extra
names being poorly normalized prior to PEP 685. If you want to perform
logic operations on extras, use :func:`is_extra_provided` instead.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ location()

Optional[str] pip._internal.metadata.pkg_resources.Distribution.location (   self)
Where the distribution is loaded from.

A string value is not necessarily a filesystem path, since distributions
can be loaded from other sources, e.g. arbitrary zip archives. ``None``
means the distribution is created in-memory.

Do not canonicalize this value with e.g. ``pathlib.Path.resolve()``. If
this is a symbolic link, we want to preserve the relative path between
it and files in the distribution.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ read_text()

str pip._internal.metadata.pkg_resources.Distribution.read_text (   self,
InfoPath  path 
)
Read a file in the info directory.

:raise FileNotFoundError: If ``path`` does not exist in the directory.
:raise NoneMetadataError: If ``path`` exists in the info directory, but
    cannot be read.

Reimplemented from pip._internal.metadata.base.BaseDistribution.

◆ version()

DistributionVersion pip._internal.metadata.pkg_resources.Distribution.version (   self)

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