[llvm] [mlir] [MLIR][Python] use `FetchContent_Declare` for nanobind and remove pybind (PR #161230)
Maksim Levental via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 7 07:52:53 PDT 2025
makslevental wrote:
> We still have a lot of usage of pybind, some of which is fairly simple to migrate, but much of which relies on some bindings/type coverters we haven't implemented for nanobind yet (e.g. `absl::StatusOr`, protos).
You can just take the deleted `PybindAdaptors.h` and use it unchanged in your downstream project. That's the only thing that materially changes (and the CMake). If your project is public I can take a look and show you how.
> Also, I don't actually see the deprecation status anywhere -- was it announced or documented anywhere that pybind support was being removed? I'd like to request a revert, at least temporarily, so we have some more lead time to migrate things over.
The switch to nanobind occurred November of last year. The upstream bindings had zero nanobind code since then. These last bits, when were just a single header, the CMake and tests, were announced to be removed last week.
https://discourse.llvm.org/t/psa-removing-pybind11-support/88465
https://github.com/llvm/llvm-project/pull/161230
More information about the llvm-commits
mailing list