doc how to access entry points / bin / scripts from wheels
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, 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 <thing>)") - 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?
I think they're just different things tbh.
entrypoints (console scripts and plugins) are shipped in wheels when python code is the entry point.
binaries are a part of wheels that just let's you package arbitrary blobs/data that is unpacked into $installation_scheme/bin outside bazel
It's common to ship things like native tools or compilers inside a wheel that way.
There isn't a metadata listing for them. But you can fish them out of the RECORD file.
So there could be a convenient userspace macro to expose them to the Bazel workspace pretty easily as well if the demand is high enough. Or docs and genrule are fine.