Skip to content

Add repl_env dependency support #3200

@AmmonHorton

Description

@AmmonHorton

🚀 feature request

Relevant Rules

Relevant rules are //python/bin:repl & //python/bin:repl_env.

Description

Goal would be to enable repl use similar to how is is used now:
bazel run @rules_python//python/bin:repl --@rules_python//python/bin:repl_dep=//python:my_rule_with_deps
This is how I start interactive shells with access to runfiles and python packages depended on by the specified label.

It would be convenient to also enable the same for environment variables specified in that label. Could potentially be added to repl_dep. Alternative is:
--@rules_python//python/bin:repl_env=//python:my_rule_with_deps

Potential Solution

Could add env attr assingment here.

kwargs forwarding should take care of any changes needed in py_binary_rule impl (I think).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions