Skip to content

Commit

Permalink
Implement find_distributions for _BackendPathFinder
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Apr 30, 2024
1 parent 721d2ee commit d3e9126
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pyproject_hooks/_in_process/_in_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ def find_spec(self, fullname, _path, _target=None):

return spec

def find_distributions(self, context=None):
# Delayed import: Python 3.7 does not contain importlib.metadata
from importlib.metadata import DistributionFinder, MetadataPathFinder

context = DistributionFinder.Context(path=self.backend_path)
return MetadataPathFinder.find_distributions(context=context)


def _supported_features():
"""Return the list of options features supported by the backend.
Expand Down

0 comments on commit d3e9126

Please sign in to comment.