Skip to content

Normalize wheel RECORD paths (on Windows)#2965

Merged
messense merged 2 commits intoPyO3:mainfrom
texodus:normalize-paths-windows
Feb 7, 2026
Merged

Normalize wheel RECORD paths (on Windows)#2965
messense merged 2 commits intoPyO3:mainfrom
texodus:normalize-paths-windows

Conversation

@texodus
Copy link
Copy Markdown
Contributor

@texodus texodus commented Feb 6, 2026

#2870 refactored module_writer.rs, and in doing so removed a line which reformatted PathBuf rendered platform-specific Strings to exclusively us /:

// The zip standard mandates using unix style paths
let target = target.to_str().unwrap().replace('\\', "/");

While it seems this is technically allowed, some tools choke on this. In my case, the wheel package does not like windows-style paths in the RECORD file (even on Windows itself).

I've also added a unit test to validate this - though because the implementation uses PathBuf::to_string_lossy, it will only actually fail on Windows.

@messense
Copy link
Copy Markdown
Member

messense commented Feb 7, 2026

Thanks for the PR, Windows CI is failing, we need to get it fixed to merge this.

@texodus texodus force-pushed the normalize-paths-windows branch from 0c1e111 to a6392a1 Compare February 7, 2026 03:22
@messense messense merged commit 9ed54e1 into PyO3:main Feb 7, 2026
42 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants