bazel-contrib / bazel-contrib/rules_python

py_cc_toolchain should contain EXT_SUFFIX

Open
#2,870 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
688
Forks
721
Avg merge
14h 49m
Merged PRs (30d)
81

Description

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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.