python / importlib_metadata

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

Detecting and handling PDM's symlinked packages #453

Closed jherland closed 1 year ago

jherland commented 1 year ago

This is accompanying issue #452: The first commit adds a test case to demonstrate the issue, and the second attempt is a first, rough, attempt at fixing it.

I am unsure if a proper fix should only have _top_level_inferred() recurse/walk into symlinked directories, or if the recurse/walk should also apply to Distribution.files().

Commits:

jaraco commented 1 year ago

I am unsure if a proper fix should only have _top_level_inferred() recurse/walk into symlinked directories, or if the recurse/walk should also apply to Distribution.files().

My instinct is that Distribution.files() should be naive and return the files for the virtual package as installed and not resolve to the linked content - at least until such a time that linked packages are more formally defined and accepted as a standard in the Python ecosystem.