Skip to content

Commit

Permalink
Restore logic for parts.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Mar 18, 2023
1 parent 6610368 commit df7824b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
v6.1.0
======

* #428: ``packages_distributions`` now honors packages and modules
with Python modules that not ``.py`` sources (e.g. ``.pyc``,
``.so``).

v6.0.1
======

Expand Down
2 changes: 1 addition & 1 deletion importlib_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def _top_level_declared(dist):

def _top_level_inferred(dist):
opt_names = {
inspect.getmodulename(f) if len(f.parts) == 1 else f.parts[0]
f.parts[0] if len(f.parts) > 1 else inspect.getmodulename(f)
for f in always_iterable(dist.files)
}
return filter(None, opt_names)

0 comments on commit df7824b

Please sign in to comment.