bazel-contrib / bazel-contrib/rules_python

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

Đang mở
#2,980 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Good first issue type: documentation
Ngôn ngữ chính
Starlark
Star
688
Fork
721
Merge trung bình
15 giờ 7 phút
Pull request đã merge (30 ngày)
76

Mô tả

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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with the entry-points section of the rules-python documentation linked in the issue. Check how it currently explains binaries from wheels, then document the requested use cases: invoking a binary from a genrule, calling it from another program, and putting it on PATH, potentially with a table mapping non-Bazel idioms to Bazel ones.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
build-system, documentation
Loại issue
Tài liệu
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.