pybind11 icon indicating copy to clipboard operation
pybind11 copied to clipboard

fix: PyPy needs to override broken FindPythonInterp values

Open henryiii opened this issue 3 years ago • 2 comments

Description

Should fix https://github.com/pybind/scikit_build_example/pull/45.

Suggested changelog entry:

* Fix regression with PyPy + classic FindPythonInterp

henryiii avatar Sep 22 '22 05:09 henryiii

Actually I think it's our stuff around FindPython that's breaking, not this one. Will make a new PR just in case I'm wrong and this history is useful.

henryiii avatar Sep 22 '22 12:09 henryiii

No, I take that back, this is running the old one - where are these values being set? Not by FindPythonInterp as far as I can tell...

henryiii avatar Sep 22 '22 12:09 henryiii

@rwgk or @Skylion007 What do you think? This reverts the 2.10 default change and instead makes it opt-in for now. The problem is that currently tools like scikit-build reuse the same cache dir for multiple builds, which causes the "promote to cache" that's done here to override new values with old ones on new runs. Scikit-build really should make per-interpreter cached directories; that would help, but for now, this seems like the simplest fix.

However, I'm torn - I'm also fine to say it's scikit-build's problem, and it needs include the interpreter string in the build path that gets cahced. Scikit-build-core will probably be designed this way from the start (currently, it just doesn't support caching at all - caching build directories is hard 😆). But that will make fixing scikit_build_example ugly for a bit until a proper fix lands in scikit-build. But this might motivate me. ;)

What do you think? Option a) (this PR) or option b) (declare it not broken and working as expected).

henryiii avatar Oct 21 '22 22:10 henryiii