python / importlib_metadata

Library to access metadata for Python packages
https://importlib-metadata.readthedocs.io
Apache License 2.0
123 stars 80 forks source link

Incomplete `packages_distributions` #428

Closed FFY00 closed 1 year ago

FFY00 commented 1 year ago

The search logic is very limited. I understand that we probably just wanted to keep things simple when it was added, but I want to understand if there's any plan to improve it?

https://github.com/python/importlib_metadata/blob/d66e35a7b5687b5305cf16fca4e6b1e82008b592/importlib_metadata/__init__.py#L899-L904

In meson-python, I had to implement a more complete version of this logic. Would it make sense to port it here?

https://github.com/mesonbuild/meson-python/blob/61bb2b3315f4e312558778022ca6e87ffaed2700/mesonpy/__init__.py#L336-L359

FFY00 commented 1 year ago

The current logic only returns pure Python top-level modules or package modules with at least one .py file.