class documentation

class PathDistribution(Distribution): (source)

View In Hierarchy

Undocumented

Method __init__ Construct a distribution.
Method locate_file Given a path to a file in this distribution, return a path to it.
Method read_text Attempt to load metadata file given by the name.
Static Method _name_from_stem >>> PathDistribution._name_from_stem('foo-3.0.egg-info') 'foo' >>> PathDistribution._name_from_stem('CherryPy-3.0.dist-info') 'CherryPy' >>> PathDistribution._name_from_stem('face.egg-info') 'face' >>> PathDistribution...
Instance Variable _path Undocumented
Property _normalized_name Performance optimization: where possible, resolve the normalized name from the file system path.

Inherited from Distribution:

Class Method discover Return an iterable of Distribution objects for all packages.
Class Method from_name Return the Distribution for the given package name.
Static Method at Return a Distribution for the indicated metadata path
Property entry_points 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_from_requires_text Undocumented
Static Method _convert_egg_info_reqs_to_simple_reqs 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_resolvers Search the meta_path for resolvers.
Method _read_dist_info_reqs Undocumented
Method _read_egg_info_reqs Undocumented
Method _read_files_distinfo Read the lines of RECORD
Method _read_files_egginfo SOURCES.txt might contain literal commas, so wrap each line in quotes.
def __init__(self, path: SimplePath): (source)

Construct a distribution. :param path: SimplePath indicating the metadata directory.

def locate_file(self, path): (source)

Given a path to a file in this distribution, return a path to it.

def read_text(self, filename): (source)

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.

@staticmethod
def _name_from_stem(stem): (source)

>>> PathDistribution._name_from_stem('foo-3.0.egg-info') 'foo' >>> PathDistribution._name_from_stem('CherryPy-3.0.dist-info') 'CherryPy' >>> PathDistribution._name_from_stem('face.egg-info') 'face' >>> PathDistribution._name_from_stem('foo.bar')

Undocumented

@property
_normalized_name = (source)

Performance optimization: where possible, resolve the normalized name from the file system path.