Skip to content

draft: helper to run an arbitrary interpreter or interpreter from a binary - #2359

Closed
rickeylev wants to merge 1 commit into
bazel-contrib:mainfrom
rickeylev:feat.tools.run
Closed

draft: helper to run an arbitrary interpreter or interpreter from a binary#2359
rickeylev wants to merge 1 commit into
bazel-contrib:mainfrom
rickeylev:feat.tools.run

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Run a specific interpreter:

  • bazel run @rules_python//tools/run --@rules_python//python/config_settings:python_version=3.12

Run interpreter from a binary:

  • bazel run @rules_python//tools/run --@rules_python//tools/run:bin=//my:binary

Run a specific interpreter:
* `bazel run @rules_python//tools/run --@rules_python//python/config_settings:python_version=3.12`
Run interpreter from a binary:
* `bazel run @rules_python//tools/run --@rules_python//tools/run:bin=//my:binary`
@aignas

Copy link
Copy Markdown
Collaborator

FYI: @philsc

github-merge-queueBot pushed a commit that referenced this pull request Feb 16, 2025
There are some use cases that folks want to cover here. They are
discussed in [this Slack thread][1]. The high-level summary is:
1. Users want to run the exact same interpreter that Bazel is running
to minimize environmental issues.
2. It is useful to pass a target label to third-party tools like mypy
so that they can use the correct interpreter.
This patch adds to @rickeylev's work from #2359 by adding docs
and a few integration tests.
[1]: https://bazelbuild.slack.com/archives/CA306CEV6/p1730095371089259
---------
Co-authored-by: Richard Levasseur <rlevasseur@google.com>
@rickeylev
rickeylev deleted the feat.tools.run branch February 22, 2025 22:06
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@rickeylev@aignas