What characters are allowed as path separators in the “path” fields of entries in *.dist-info/RECORD files inside wheels? Just /, or both / and \?
Both PEP 427 and the “Binary distribution format” spec on packaging.python.org refer to PEP 376 for the definition of RECORD, and that PEP states that paths are /-separated when they’re not absolute (which they wouldn’t be inside a wheel). The “Recording installed projects” spec derived from PEP 376, on the other hand, only states “On Windows, directories may be separated either by forward- or backslashes (/ or \)” regarding path separators.
I ask because some wheels built with maturin and a few other backends use backslashes as the path separator (presumably whenever the wheel is built on and/or for Windows), and wheel-inspect & wheelodex.org (which I both maintain) flag these wheels as invalid, and I need to know whether I should fix my code or file issues asking the backends to fix theirs.
Inspector links for random example wheels exhibiting the problem:
- sprocket_rl_parser-1.2.19-cp39-cp39-win_amd64.whl (Generator: maturin)
- pyagrum_nightly-2.3.2.9.dev202602031769423251-cp310-abi3-win_amd64.whl (Generator: act)
- torchrl-0.11.0-cp310-cp310-win_amd64.whl (Generator: setuptools)
- jobase-3.1-cp310-cp310-win32.whl (Generator: JoBase)
- quickjs_runtime-0.2.4-cp312-cp312-win_amd64.whl (Generator: zigcc-build-backend)