Description
It is not currently possible to use importlib.resources
APIs like importlib.resources.files
to access all of the files in an editable install using redirect-based editable installs. Files in the source directory (i.e. Python source files) are discoverable, but files in the build directory (i.e. CMake-generated files) are not. The reason is quite subtle and is a few layers down in the importlib stack, but it boils down to the fact that a Traversable
is designed to represent a single node on the filesystem rather than a list of nodes.
Inplace editable installs also seem to fail here, but I have not checked why that is the case yet.
I will open a PR with a failing test as well as a demonstration of where I would expect to be able to fix this is if it were possible. I suspect that there is not easy way to solve this without modifications in CPython's importlib
definitions.