@blink1073 just FYI, I am currently working in this PoC for the proposal above: GitHub - abravalheri/setuptools at editable-link-tree (WIP):
- For the “lax/loose” approach, either a static
.pth
file is produced or aMetaPathFinder
is added, depending on the project layout. - For the “strict” mode, the existing files detected by
package_data
get linked (symlink if possible, hardlink otherwise).
In both scenarios, the <package>-<version>.data
wheel entry is generated normally as it would in a conventional wheel.
I may be wrong here, but after reading the specs for editable installs and the wheel format I was under the impression that there is not much of a choice for the .data
directory other than having it baked statically inside the .whl
archive.
For Python modules and package_data
we can use the trick suggested in PEP 660 of creating a link tree out-off-band and then add adding a static .pth
file pointing to it, but I don’t know if adding the *.data
directory there would have the intended effects. For example, would sysconfig.get_path
work to detect these files?
Currently we don’t have a mechanism to represent links in the wheel, and I have the impression that any of the other well-known approaches, such as a MetaPathFinder
or a static .pth
file, would be of no use for the *.data
directory…