Commit 2f6ca17
authored
fix: skip precompiling if using Bazel-builtin PyRuntimeInfo (#2394)
When the `@bazel_tools//python/tools:python_autodetecting` toolchain is
used, it returns
the Bazel-builtin PyRuntimeInfo provider. Because this provider doesn't
support the
additional fields needed for precompiling (`pyc_tag`, among others), it
would result in
an attribute error.
To fix, detect the absence of the `pyc_tag` attribute and return early,
as is done when
the pyc_tag field is empty.
Fixes #23641 parent 1b2714e commit 2f6ca17
2 files changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
| |||
0 commit comments