[New-bugs-announce] [issue44445] Add `site-include` install scheme path in sysconfig

Filipe Laíns report at bugs.python.org
Thu Jun 17 11:03:28 EDT 2021


New submission from Filipe Laíns <lains at riseup.net>:

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

----------
messages: 396004
nosy: FFY00, dstufft, eric.araujo, jaraco, pablogsal, steve.dower, tarek
priority: high
severity: normal
status: open
title: Add `site-include` install scheme path in sysconfig
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44445>
_______________________________________


More information about the New-bugs-announce mailing list