-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(cmake): skip empty PYBIND11_PYTHON_EXECUTABLE_LAST for the first cmake run #4856
Conversation
A value won’t ever be equal to an empty string. Though this avoids the undefined variable usage warning if you enable that, is that why? Didn’t think we were very close to passing that. |
The value of |
Ah, I see, this is the reverse of what I was thinking. I'm pretty sure we are using the empty value on first run to fill this if needed. If you aren't manually setting PYTHON_MODULE_EXTENSION, it needs to be set, right? |
Ahh, no, the block is shorter than I thought. Hmm, this might (mostly) work. In your case, if you did have the interpreter change, then you'd still lose the manually set value. |
The only issue here, then, is if PYBIND11_PYTHON_EXECUTABLE_LAST is unset, it will never be set. |
Yes, I agree with current state. Thanks for noticing it |
ping |
I think this is fine to go in, haven't been able to get anyone else to review it. Thanks! |
(I'll merge after CMake 3.27.8 gets uploaded and un-breaks our CI. There's a narrow window (<1 hour) between a release and the binaries being uploaded that we get failing CI runs in). |
Could you please merge the PR? |
### Details: - Removed WA for cross-compilation case - It's possible because fix pybind/pybind11#4856 is included to latest released version
### Details: - Removed WA for cross-compilation case - It's possible because fix pybind/pybind11#4856 is included to latest released version
### Details: - Removed WA for cross-compilation case - It's possible because fix pybind/pybind11#4856 is included to latest released version
Description
Closes #4854
Suggested changelog entry:
Skip empty ``PYBIND11_PYTHON_EXECUTABLE_LAST`` for the first cmake run