# PEP 660 and setuptools

**URL:** <https://discuss.python.org/t/pep-660-and-setuptools/14855>\
**Category:** Packaging\
**Created:** [April 5, 2022, 6:46pm UTC](https://discuss.python.org/t/pep-660-and-setuptools/14855 "2022-04-05T18:46:22Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![abravalheri](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/abravalheri/32/4990_2.png) [@abravalheri](https://discuss.python.org/u/abravalheri)\
**Post date:** [April 13, 2022, 2:33pm UTC](https://discuss.python.org/t/pep-660-and-setuptools/14855/6 "2022-04-13T14:33:55Z")

</div>

@blink1073 just FYI, I am currently working in this PoC for the proposal above: [GitHub - abravalheri/setuptools at editable-link-tree](https://github.com/abravalheri/setuptools/tree/editable-link-tree) (WIP):

- For the “lax/loose” approach, either a static `.pth` file is produced or a `MetaPathFinder` 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…

---

_[View the full topic](https://discuss.python.org/t/pep-660-and-setuptools/14855)._
