bazel-contrib / bazel-contrib/rules_python
py_cc_toolchain should contain EXT_SUFFIX
- 主要语言
- Starlark
- 星标
- 688
- 派生
- 721
- 平均合并
- 15 小时 7 分钟
- 30 天内合并 PR
- 76
描述
See https://github.com/bazelbuild/bazel-central-registry/pull/4539#discussion_r2080143661 for some context.
This value is needed to create python extensions. Note that there are a few different names that can be used, for example `.so`, `.abi3.so`, and `.cpython-312-x86_64-linux-gnu.so`. The latter is preferable when not using the python limited api because it prevents runfiles conflicts between python versions properly, meaning that transitions can work without completely breaking things.
I believe for autoconfigured pythons, you could obtain this value like so:
```
❯ python -c 'import sysconfig; print(sysconfig.get_config_var("EXT_SUFFIX"))'
.cpython-312-x86_64-linux-gnu.so
```
贡献指南
调研方向
从 py_cc_toolchain 的自动配置路径开始,并查看链接的 bazel-central-registry 讨论以了解背景。运行所示的 Python sysconfig 命令来检查 EXT_SUFFIX 值;当工具链公开适当的后缀(包括可用时完整的解释器特定形式)时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- build-system
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100