During the distutils deprecation, we have identified that there is no good replacement for the distutils `headers` install path. This path defines where packages are supposed to install headers on the system.
The setuptools equivalent would be `include`/`platinclude`, but these paths depend on `installed_base`/`installed_platbase`, which makes them the same on virtual environments. For this reason, they are not very suitable as a `headers` replacement -- if a package installs to `include` on a virtual environment, those files will be available everywhere.
{
...
'include': '{installed_base}/include/python{py_version_short}{abiflags}',
'platinclude': '{installed_platbase}/include/python{py_version_short}{abiflags}',
}
I propose introducing two new paths, `site-include` and `site-platinclude`, as follows:
{
...
'include': '{installed_base}/include/python{py_version_short}{abiflags}',
'platinclude': '{installed_platbase}/include/python{py_version_short}{abiflags}',
'site-include': '{base}/include/python{py_version_short}{abiflags}-site',
'site-platinclude': '{platbase}/include/python{py_version_short}{abiflags}-site',
}
This would make them different paths on virtual environments and would allow us to install header files there instead of `include`/`platinclude`.
Does anyone have a better idea? Or is there perhaps something I have missed?
---
Hopefully, this could go into Python 3.10, so that users can easily replace distutils usages with sysconfig. I understand if that may be unlikely.
---
Relevant links:
https://discuss.python.org/t/clarification-on-a-wheels-header-data/9305
https://github.com/pypa/pip/issues/9617
|