bazel-contrib / bazel-contrib/rules_python

Discuss how the venv layout could facilitate entry points

Open
#3,747 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
688
Forks
721
Avg merge
15h 7m
Merged PRs (30d)
76

Description

> Currently the py_console_script_binary is building a full runfiles tree and for the usecase that you are implementing in here - a py_binary is just calling utilities within the same venv that is a little bit too heavy. I want to separate the usecases for py_console_script_binary to be only something where we actually want to build a full separate venv for the said scripts.

Ah, I think I get what you mean. Do you want to file an issue for further discussion? entrypoints/scripts/things-in-bin seem distinct enough they warrant _something_ in a provider, but it's not clear to me how a consumer can make effective use of it via a py_binary.

_Originally posted by @rickeylev in https://github.com/bazel-contrib/rules_python/issues/3743#issuecomment-4345478121_

Contributor guide

Open the contributing guide

Research direction

Start by reading py_console_script_binary, py_binary, and the entrypoints/scripts/things-in-bin references mentioned in the discussion. Trace how the current full runfiles tree and separate venv are used, then clarify the provider and consumer behavior needed for scripts within the same venv. Done means the use cases and an agreed design for making those entry points usable via py_binary are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.