bazel-contrib / bazel-contrib/rules_python

py_cc_toolchain should contain EXT_SUFFIX

Ouverte
#2,870 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Starlark
Étoiles
688
Forks
721
Merge moyen
15 h 7 min
PR mergées (30 j)
76

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start with the py_cc_toolchain autoconfiguration path and review the linked bazel-central-registry discussion for context. Run the shown Python sysconfig command to inspect EXT_SUFFIX values; done means the toolchain exposes the appropriate suffix, including the full interpreter-specific form when available.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
build-system
Type d'issue
Fonctionnalité
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.