Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make CreateEmbeddedPipPackagesForKnownPlatforms work with windows paths #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sutorenja
Copy link

@Sutorenja Sutorenja commented Feb 21, 2025

This PR fixes #19

files.json (the file generated by doWriteFilesList()) stores platform-native paths to python packages. On Windows, the stored paths would be separated by backslashes, e.g. PIL\\BdfFontFile.py.

The stored paths are used directly by fs.ReadFile. fs.ReadFile is unconventional in that the paths MUST BE forward slashed regardless of the OS its ran on. From the io/fs docs:

Note that paths are slash-separated on all systems, even Windows. Paths containing other characters such as backslash and colon are accepted as valid, but those characters must never be interpreted by an FS implementation as path element separators

This PR converts the backslashes in the path to forward slashes right before calling fs.ReadFile. It does not change how the paths in files.json are stored.

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.

files.json path separator
1 participant