-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Expose PyRuntimeInfo
from py_binary
and py_test
#7805
Labels
P1
I'll work on this now. (Assignee required)
team-Rules-Python
Native rules for Python
type: feature request
Comments
This was referenced Mar 21, 2019
Aiming to do this in 0.27. |
0.28 it is. |
siberex
pushed a commit
to siberex/bazel
that referenced
this issue
Jul 4, 2019
This allows targets that depend on an executable Python target to see what runtime was chosen from the toolchain. The returned `PyRuntimeInfo` provider is the same type of value as what's returned by the `py_runtime` rule. For example, the path to the system interpreter (if not using an in-workspace interpreter) can be accessed from a dependency as `mydep[PyRuntimeInfo].interpreter_path`. The Python major version for a target can also indirectly be obtained from the version of its runtime, as `mydep[PyRuntimeInfo].python_version`. Fixes bazelbuild#7805. RELNOTES: None PiperOrigin-RevId: 254212408
irengrig
pushed a commit
to irengrig/bazel
that referenced
this issue
Jul 15, 2019
This allows targets that depend on an executable Python target to see what runtime was chosen from the toolchain. The returned `PyRuntimeInfo` provider is the same type of value as what's returned by the `py_runtime` rule. For example, the path to the system interpreter (if not using an in-workspace interpreter) can be accessed from a dependency as `mydep[PyRuntimeInfo].interpreter_path`. The Python major version for a target can also indirectly be obtained from the version of its runtime, as `mydep[PyRuntimeInfo].python_version`. Fixes bazelbuild#7805. RELNOTES: None PiperOrigin-RevId: 254212408
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
P1
I'll work on this now. (Assignee required)
team-Rules-Python
Native rules for Python
type: feature request
PyRuntimeInfo
is the provider type produced bypy_runtime
-like rules. It is consumed (either through toolchains (#7375) or legacy flags) by executable Python rules. We can have these executable rules re-export the provider so downstream targets can see what Python interpreter a givenpy_binary
is configured to use.The text was updated successfully, but these errors were encountered: