Hello, I was reviewing the details of installing a wheel’s data files PEP 427 -- The Wheel Binary Package Format 1.0 | Python.org and the destination of header files feels ambiguous. Although none of the designated data directories (purelib, platlib, headers, scripts, data) have explicit targets mentioned and the PEP only says “… the contents of these subdirectories are moved onto their destination paths.” the others all follow from Python’s sysconfig. Although sysconfig does have a notion of an include path and this could be inferred as a possible target for headers, sysconfig also has platinclude. Which one should be used if they are different? And should distributions be allowed to provide both platform dependent and independent headers?
It seems that distutils, setuptools, and pip each craft their own path for headers, even if otherwise pulling from sysconfig, which ends up being the same as the include path.
Some possible thoughts for how to move forward:
- clarify in PEP-427 that headers are assumed to be platform (in)dependent and should be co-located with other headers of the same type. It does not need to become explicit about that destination
- another way to reduce ambiguity would be to rename the headers directory to include which would call attention to which type of header files are expected, based on the definition in sysconfig. Alternatively a headers key could be added to sysconfig that is an alias for one of (plat)include
- this is a rather heavy handed way to make this distinction, and will take possibly years to disseminate across the ecosystem. OTOH this seems like the only place that python differs between an include path and a headers path. And with distutils finally on its way out it makes even less sense why the difference exists
- do wheel files need support for both include and platinclude style headers?
- probably not based on the 1.0 spec coming up on 10 years and it not being asked for. However as soon as we say they must be treated as either one or the other users may start coming forward asking for the opposite. It also completes the relationship with sysconfig paths (excluding core locations).