python / importlib_metadata

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

Suggest documenting that `packages_distributions` won't work with editable installs #402

Closed layday closed 1 year ago

layday commented 2 years ago

As discussed in https://github.com/pypa/packaging-problems/issues/609, PEP 660 editable wheels which are generated by backends other than setuptools will not contain a top_level.txt and with the RECORD only listing e.g. the pth file with an entry to the original package directory, packages_distributions will not be able to reconcile editable packages with their corresponding distributions.

pfmoore commented 2 years ago

A longer term alternative to simply documenting the limitation would be to standardise something equivalent to top_level.txt.

Helveg commented 2 months ago

Is there a planned solution for this being tracked anywhere?

jaraco commented 2 months ago

I'm not aware of one. It would require expanding the standard for editable installs to provide the necessary metadata. There's nothing importlib_metadata can do until that happens. It looks like https://github.com/pypa/packaging-problems/issues/620 already tracks a similar if not identical concern. Feel free to chime in and contribute there.