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

correct virtualenv bin dir under mingw python #901

Merged
merged 4 commits into from
Jan 3, 2025

Conversation

davidhewitt
Copy link
Contributor

I believe this fixes #630

... at least, I was able to remove the workaround I had in PyO3/setuptools-rust#501

Open to alternative ideas / suggestions how you'd like this tested.

@henryiii
Copy link
Collaborator

The idiomatic thing is to use sys.platform.startswith, which also happens to be correct here, I think: https://stackoverflow.com/questions/446209/possible-values-from-sys-platform

@henryiii
Copy link
Collaborator

We might need to be careful mocking (see #902), but I'm curious to see if this runs first.

davidhewitt and others added 2 commits December 12, 2024 21:44
@henryiii
Copy link
Collaborator

Could you make sure this also fixes your issue? I think it's a better fix and should handle Cygwin and such too.

@davidhewitt
Copy link
Contributor Author

Sorry for the delay, I finally reran on the setuptools-rust CI and it looks like this branch didn't work, I'll try to debug when I get the chance.

@davidhewitt
Copy link
Contributor Author

Ok so I had a debugging session and it seems like sys.platform is still just win32, so that seems to be insufficient to detect msys2. The MSYS2 portability docs seem to explicitly point to using sysconfig.get_platform() in https://www.msys2.org/docs/python/

I restored the _IS_MINGW check against sysconfig.get_platform(), and it's fixed the workflow again. Would you like me to push a (mocked) test?

@davidhewitt
Copy link
Contributor Author

I found a brief moment to push a test, hopefully looks suitable. Happy New Year!

@henryiii henryiii merged commit 60acbbe into wntrblm:main Jan 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

session.install fails on MSYS2 virtualenv
2 participants