| load("//python:py_test.bzl", "py_test") | |
| genrule( | |
| name = "uv_help", | |
| outs = ["uv_help.txt"], | |
| cmd = 'test "$(UV)" = "$(UV_BIN)" && $(UV) --python-fetch manual --help >$@', | |
| toolchains = ["//python/uv:current_toolchain"], | |
| ) | |
| py_test( | |
| name = "uv_help_test", | |
| srcs = ["uv_help_test.py"], | |
| data = [ | |
| ":uv_help", | |
| "//python/uv:current_toolchain", | |
| "//python/uv/bin:uv", | |
| "@uv", | |
| ], | |
| env = { | |
| "DATA": "$(rlocationpath :uv_help)", | |
| "UV_BIN": "$(rlocationpath @uv//:uv)", | |
| "UV_CURRENT_TOOLCHAIN": "$(rlocationpath //python/uv:current_toolchain)", | |
| "UV_RULES_PYTHON_UV": "$(rlocationpath //python/uv/bin:uv)", | |
| }, | |
| deps = ["//python/runfiles"], | |
| ) |