This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author FFY00
Recipients FFY00, dstufft, eric.araujo, jaraco, pablogsal, steve.dower, tarek
Date 2021-06-17.15:03:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623942208.43.0.621445516609.issue44445@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-06-17 15:03:28FFY00setrecipients: + FFY00, jaraco, tarek, eric.araujo, steve.dower, dstufft, pablogsal
2021-06-17 15:03:28FFY00setmessageid: <1623942208.43.0.621445516609.issue44445@roundup.psfhosted.org>
2021-06-17 15:03:28FFY00linkissue44445 messages
2021-06-17 15:03:28FFY00create