-
Notifications
You must be signed in to change notification settings - Fork 778
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
pyo3-build-config: fix windows "cross-compile" panic #2232
Conversation
Actually it's linux not windows now. |
8e48955
to
f655fc1
Compare
I think this could still work, i.e. |
Here we correctly force cross compilation if pyo3/pyo3-build-config/src/lib.rs Line 73 in 01788b7
But in here the logic is a little different pyo3/pyo3-build-config/src/lib.rs Line 180 in 01788b7
|
Yeah, we should probably bite the bullet and properly unify those code paths. @davidhewitt If you are busy I can cook up something here or elsewhere factoring out the logic for checking for cross compilation and creating that configuration? |
I suspect that is actually necessary because of cases where we do detect cross-compilation, but do not have the environment variables set. I think this fix here only takes care of the other way around? |
Yeah it's necessary, I think it only missed that it should also do cross compilation when the environment variables are set. |
I think we should probably unify those code paths a bit, I have some ideas. I'm enjoying having a go at this at the moment - might take me a few gaps through the day. Got a bit of a routine beginning to form. If things get busy later I might push, run, and ping you @adamreichold 😅 |
f655fc1
to
480f280
Compare
I think it would make sense to cherry-pick that commit here so that we have only a single PR. |
Agreed, I'll cherry-pick once windows job fixed. |
480f280
to
fc184da
Compare
fc184da
to
26061cc
Compare
Think this is getting there now. @adamreichold I'm going to be busy for a few hours or so now, if you're around and want to finish this off feel welcome. Otherwise I'll hopefully tidy up this evening. |
26061cc
to
7f117b5
Compare
Looks great, let's merge? I'm hoping we can tidy the coverage later in #2191 |
Possible fix for #2229