Provide a fine grained mechanism for specifying `PYBIND11_ABSEIL_STATUS_MODULE_PATH`

未关闭
#18 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp
领域
build-system

调研方向

从 README.md 和 @pybind11_abseil//pybind11_abseil:status_casters 目标开始,然后追踪 pybind11::google::ImportStatusModule() 如何使用 PYBIND11_ABSEIL_STATUS_MODULE_PATH。定义所需的按目标定制边界,并验证使用者可以通过该目标设置模块路径,而无需应用全局 Bazel --cxxopt。

由索引模型根据 Issue 内容生成。

描述

bazel bug

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.

主要语言
C++
星标
27
派生
22
平均合并
19 小时
30 天内合并 PR
45

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pybind/pybind11_abseil 的其他 Issue

查看 pybind/pybind11_abseil 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。