-
-
Notifications
You must be signed in to change notification settings - Fork 576
feat: provide access to arbitrary interpreters #2507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: provide access to arbitrary interpreters #2507
Conversation
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`
$ bazel run //python/bin:repl $ bazel run //python/bin:repl --//python/bin:repl_dep=//python/runfiles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is still a draft, so take my suggestions with a grain of salt :)
I noticed that my `$(location //path/to:target)` wasn't getting expanded when writing a test. This patch fixes the issue by forwarding the already-expanded environment from the inner target to the outer target.
Implementation wise, I think this looks good. Just the cleanup as discussed needed |
I don't think the changes here are causing the mypy failure 🤔 |
re: mypy failures: Yeah, its unrelated. It started failing a couple days ago, but nobody has yet looked into why. |
Ah, I got a bit excited and merged this a bit soon -- CHANGELOG.md updates are missing |
This was a forgotten part of the original PR (#2507) implementing it.
There are some use cases that folks want to cover here. They are
discussed in this Slack thread. The high-level summary is:
to minimize environmental issues.
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.