scikit-build-core icon indicating copy to clipboard operation
scikit-build-core copied to clipboard

Editable mode fails in simple starter uv example

Open fizzxed opened this issue 5 months ago • 3 comments

See: https://github.com/astral-sh/uv/issues/14383 In summary, when trying to make the basic example provided by uv for scikit-build-core editable, cmake can't find the pybind11 package. Reproduction steps listed in the linked issue, the comments say that this is a but with scikit-build-core not uv.

fizzxed avatar Jul 01 '25 20:07 fizzxed

This is a general issue with all isolated builds and editable installs. If you make an isolated build, pip or uv makes an isolated environment, installs scikit-build-core and pybind11 into it, then builds the package pointing at that environment. Then it throws it away once it's done. But for an editable install, you need those requirements later to rebuild! Scikit-build-core actually doesn't need itself to build, but it does need any other packages you request, like pybind11. You'll need to do a non-editable install, and include the build requirements. This is true for all editable backends that need dependencies when rebuilding.

henryiii avatar Jul 01 '25 20:07 henryiii

So in this case, editable installs and isolated builds are mutually exclusive?

fizzxed avatar Oct 27 '25 21:10 fizzxed

Pretty much so. The best we could do is provide some functionality to run find_package and then conditionally add the build-system.requires, but it could be quite fragile and not account for any hints in the make CMakeLists file.

As a workaround, at least right now, you can pass pybind11_ROOT environment variable to overwrite the find_package to something more stable.

LecrisUT avatar Oct 28 '25 07:10 LecrisUT