bazel-contrib / bazel-contrib/rules_python

doc how to access entry points / bin / scripts from wheels

Ouverte
#2,980 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Good first issue type: documentation
Langage dominant
Starlark
Étoiles
688
Forks
721
Merge moyen
15 h 7 min
PR mergées (30 j)
76

Description

In a non-bazel venv, distributions make executables available by putting them in `$venv/bin`, which gets added to PATH. In older versions of rules python, py_binary's were generated for these. It isn't obvious how to do similar in the latest versions.

I think the entry-points doc is the relevant part? https://rules-python.readthedocs.io/en/latest/pypi/use.html#entry-points

I suspect the term "entry point", while correct, is too jargon. In [this Slack post](https://bazelbuild.slack.com/archives/CA306CEV6/p1749710911117809), the user described it more in terms of "I want to run a binary from the package".

I'd suggest rephrasing the docs to be use-case oriented in the user's terms, e.g.

* I want to run a binary from a wheel in e.g. `genrule(cmd="$(location )")`
* I want to run a binary from a wheel from another program
* I want a binary to be available on PATH so I can run it like in a normal venv.

Maybe a table that maps non-bazel idioms to bazel idioms would be helpful?

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la section entry-points de la documentation de rules-python liée dans l’issue. Vérifiez comment elle explique actuellement les binaires provenant de wheels, puis documentez les cas d’utilisation demandés : invoquer un binaire depuis un genrule, l’appeler depuis un autre programme et le mettre sur PATH, éventuellement avec un tableau faisant correspondre les idiomes non-Bazel aux idiomes Bazel.

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

Évaluation

Stack technique
python
Domaine
build-system, documentation
Type d'issue
Documentation
Difficulté
2/5
Temps estimé
1-3 heures
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.