bazel-contrib / bazel-contrib/rules_python

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

オープン
#2,980 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
Good first issue type: documentation
主要言語
Starlark
スター
688
フォーク
721
平均マージ
15時間 7分
マージ済み PR(30日)
76

説明

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?

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Issue でリンクされている rules-python ドキュメントの entry-points セクションから始めてください。現在、wheels のバイナリについてどのように説明しているかを確認し、要求されているユースケースを文書化してください。具体的には、genrule からバイナリを呼び出すこと、別のプログラムから呼び出すこと、PATH に追加することです。必要に応じて、Bazel 以外のイディオムと Bazel のイディオムを対応付ける表を追加してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
build-system, documentation
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。