class Distribution: (source)
Known subclasses: setuptools._vendor.importlib_metadata.PathDistribution
A Python distribution package.
Class Method | discover |
Return an iterable of Distribution objects for all packages. |
Class Method | from |
Return the Distribution for the given package name. |
Static Method | at |
Return a Distribution for the indicated metadata path |
Method | locate |
Given a path to a file in this distribution, return a path to it. |
Method | read |
Attempt to load metadata file given by the name. |
Property | entry |
Undocumented |
Property | files |
Files in this distribution. |
Property | metadata |
Return the parsed metadata for this Distribution. |
Property | name |
Return the 'Name' metadata for the distribution package. |
Property | requires |
Generated requirements specified for this Distribution |
Property | version |
Return the 'Version' metadata for the distribution package. |
Class Method | _deps |
Undocumented |
Static Method | _convert |
Historically, setuptools would solicit and store 'extra' requirements, including those with environment markers, in separate sections. More modern tools expect each dependency to be defined separately, with any relevant extras and environment markers attached directly to that requirement... |
Static Method | _discover |
Search the meta_path for resolvers. |
Method | _read |
Undocumented |
Method | _read |
Undocumented |
Method | _read |
Read the lines of RECORD |
Method | _read |
SOURCES.txt might contain literal commas, so wrap each line in quotes. |
Property | _normalized |
Return a normalized version of the name. |
Return an iterable of Distribution objects for all packages. Pass a ``context`` or pass keyword arguments for constructing a context. :context: A ``DistributionFinder.Context`` object. :return: Iterable of Distribution objects for all packages.
Return the Distribution for the given package name. :param name: The name of the distribution package to search for. :return: The Distribution instance (or subclass thereof) for the named package, if found. :raises PackageNotFoundError: When the named package's distribution metadata cannot be found. :raises ValueError: When an invalid value is supplied for name.
Return a Distribution for the indicated metadata path :param path: a string or path-like object :return: a concrete Distribution instance for the path
setuptools._vendor.importlib_metadata.PathDistribution
Given a path to a file in this distribution, return a path to it.
setuptools._vendor.importlib_metadata.PathDistribution
Attempt to load metadata file given by the name. :param filename: The name of the file in the distribution info. :return: The text if found, otherwise None.
Files in this distribution. :return: List of PackagePath for this distribution or None Result is `None` if the metadata file that enumerates files (i.e. RECORD for dist-info or SOURCES.txt for egg-info) is missing. Result may be empty if the metadata exists but is empty.
Return the parsed metadata for this Distribution. The returned object will have keys that name the various bits of metadata. See PEP 566 for details.
Historically, setuptools would solicit and store 'extra' requirements, including those with environment markers, in separate sections. More modern tools expect each dependency to be defined separately, with any relevant extras and environment markers attached directly to that requirement. This method converts the former to the latter. See _test_deps_from_requires_text for an example.
setuptools._vendor.importlib_metadata.PathDistribution
Return a normalized version of the name.