mirror of
https://github.com/python/cpython.git
synced 2025-08-09 11:29:45 +00:00
21 lines
579 B
Python
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).
|
|
"""
|