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

Mount PYTHONPATH on windows as unix paths #51

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Conversation

Ovenoboyo
Copy link
Contributor

PYTHONPATHS on windows is separated by a ; instead of a : unlike unix systems. Which causes splitting of PYTHONPATH to fail

E.g C:\\python3\\Lib\\site-packages would be split into [C, \\python3...]

The splitting should instead be done using std::env::split_paths which makes use of the platform specific env separator.

The second issue is mounting windows named paths in wizer. I believe mounting C:\\python3\\Lib\\site-packages just doesn't work. Instead, convert the path to unix style (i.e C:\\python3\\Lib\\site-packages becomes /python3/Lib/site-packages) and then update the PYTHONPATH env var accordingly.

Copy link
Contributor

@G4Vi G4Vi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great work! It's unfortunate Wizer appears to have no way to specify an initial env instead of inherit host, so it looks like tampering with the host env is necessary.

@G4Vi G4Vi merged commit 15162ea into extism:main Jan 22, 2025
3 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