cpython/Lib/importlib/metadata/abc.py
2019-03-25 22:23:55 -04:00

21 lines
579 B
Python

from __future__ import absolute_import
import abc
from importlib.abc import MetaPathFinder
class DistributionFinder(MetaPathFinder):
"""
A MetaPathFinder capable of discovering installed distributions.
"""
@abc.abstractmethod
def find_distributions(self, name=None, path=None):
"""
Return an iterable of all Distribution instances capable of
loading the metadata for packages matching the name
(or all names if not supplied) along the paths in the list
of directories ``path`` (defaults to sys.path).
"""