-
Notifications
You must be signed in to change notification settings - Fork 19
Description
I am using pybind11_abseil with pybind11_bazel.
I recently updated pybind11_abseil to HEAD and was surprised when my tests failed trying to import pybind11_absil.status. It took some time to track down the offending line to pybind11::google::ImportStatusModule(); on the C++ side and then to track down how the path is discovered.
With Bazel and assuming the default external repository name of pybind11_abseil, the corresponding Python import is from pybind11_abseil.pybind11_abseil import status. It took a while to find the relevant #define in README.md.
As the README accurately states, one must pass -D PYBIND11_ABSEIL_STATUS_MODULE_PATH=<path> directly on the command line (via bazel build --cxxopt="-D ...").
I was hoping for a more fine grained customization point via a macro that wraps @pybind11_abseil//pybind11_abseil:status_casters. At the moment, it is a pure pybind_library with no way to pass a defines or local_defines without setting --cxxopt globally.