Skip to content

Commit

Permalink
Added diagnose script. Closes #461.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Dec 1, 2023
1 parent 4e118be commit b3918e7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions importlib_metadata/diagnose.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import sys

from . import Distribution


def inspect(path):
print("Inspecting", path)
dists = list(Distribution.discover(path=[path]))
if not dists:
return
print("Found", len(dists), "packages:", end=' ')
print(', '.join(dist.name for dist in dists))


def run():
for path in sys.path:
inspect(path)


if __name__ == '__main__':
run()
1 change: 1 addition & 0 deletions newsfragments/461.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added diagnose script.

0 comments on commit b3918e7

Please sign in to comment.