MCPcopy Index your code
hub / github.com/python/cpython / find_distributions

Method find_distributions

Lib/importlib/metadata/__init__.py:985–997  ·  view source on GitHub ↗

Find distributions. Return an iterable of all Distribution instances capable of loading the metadata for packages matching ``context.name`` (or all names if ``None`` indicated) along the paths in the list of directories ``context.path``.

(
        cls, context=DistributionFinder.Context()
    )

Source from the content-addressed store, hash-verified

983class MetadataPathFinder(DistributionFinder):
984 @classmethod
985 def find_distributions(
986 cls, context=DistributionFinder.Context()
987 ) -> Iterable[PathDistribution]:
988 """
989 Find distributions.
990
991 Return an iterable of all Distribution instances capable of
992 loading the metadata for packages matching ``context.name``
993 (or all names if ``None`` indicated) along the paths in the list
994 of directories ``context.path``.
995 """
996 found = cls._search_paths(context.name, context.path)
997 return map(PathDistribution, found)
998
999 @classmethod
1000 def _search_paths(cls, name, paths):

Callers

nothing calls this directly

Calls 1

_search_pathsMethod · 0.80

Tested by

no test coverage detected