bazel-contrib / bazel-contrib/rules_python

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

未关闭
#2,980 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Good first issue type: documentation
主要语言
Starlark
星标
688
派生
721
平均合并
15 小时 7 分钟
30 天内合并 PR
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 摘要。