pybind / pybind/pybind11_abseil

Provide a fine grained mechanism for specifying `PYBIND11_ABSEIL_STATUS_MODULE_PATH`

Open
#18 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bazel bug
Dominant language
C++
Stars
27
Forks
21
PR merge metrics
No merged PRs in 30d

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with README.md and the @pybind11_abseil//pybind11_abseil:status_casters target, then trace how pybind11::google::ImportStatusModule() uses PYBIND11_ABSEIL_STATUS_MODULE_PATH. Define the desired per-target customization boundary and verify that a consumer can set the module path through the target without applying a global Bazel --cxxopt.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.