Commit 059ae12
committed
Change py_binary to load from rules_python
To follow the (future) migration of the python rules out of the set of
native rules: bazelbuild/bazel#17773 .
This requires us to load the 'rules_python' module and while at it we
parameterize the 'py_binary' so it is possible for consumers to switch
to their own macros, following the model of pip_compile:
https://github.com/bazelbuild/rules_python/blob/9b2b70adba5431162401a97b2bbab1dc938e7245/python/private/pypi/pip_compile.bzl#L32
This solves loading errors:
ERROR: Traceback (most recent call last):
File "/home/nwirekli/.cache/bazel/_bazel_nwirekli/1eeb85843c9866d288d7d5644c3b4615/
external/hedron_compile_commands+/refresh_compile_commands.bzl", line 67, column 27, in <toplevel>
py_binary = native.py_binary,
Error: no native function or rule 'py_binary'
Available attributes: ...
ERROR: error loading package under directory '': error loading package '@@hedron_compile_commands+//':
initialization of module 'refresh_compile_commands.bzl' failed1 parent 4f28899 commit 059ae12
2 files changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
95 | | - | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| |||
0 commit comments