Closed ilya-lavrenov closed 9 months ago
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.
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 PYBIND11_PYTHON_EXECUTABLE_LAST
is empty on first cmake run
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?
Description
Closes https://github.com/pybind/pybind11/issues/4854
Suggested changelog entry: