36 lines
863 B
Text
36 lines
863 B
Text
|
|
load("@aspect_rules_py//py:defs.bzl", "py_binary", "py_library")
|
||
|
|
|
||
|
|
# BUILD.bazel
|
||
|
|
load("@pip_third_party//:requirements.bzl", "all_requirements", "requirement")
|
||
|
|
load("@rules_python//python/entry_points:py_console_script_binary.bzl", "py_console_script_binary")
|
||
|
|
|
||
|
|
py_library(
|
||
|
|
name = "requirements",
|
||
|
|
visibility = ["//visibility:public"],
|
||
|
|
deps = all_requirements,
|
||
|
|
)
|
||
|
|
|
||
|
|
py_console_script_binary(
|
||
|
|
name = "pip-compile",
|
||
|
|
pkg = requirement("pip-tools"),
|
||
|
|
script = "pip-compile",
|
||
|
|
deps = [
|
||
|
|
requirement("docopt"),
|
||
|
|
],
|
||
|
|
)
|
||
|
|
|
||
|
|
py_console_script_binary(
|
||
|
|
name = "pip",
|
||
|
|
pkg = requirement("pip"),
|
||
|
|
script = "pip",
|
||
|
|
)
|
||
|
|
|
||
|
|
sh_binary(
|
||
|
|
name = "uv_compile",
|
||
|
|
srcs = ["uv_compile_wrapper.sh"],
|
||
|
|
data = select({
|
||
|
|
"@platforms//os:macos": ["@uv_macos_aarch64//:uv"],
|
||
|
|
"@platforms//os:linux": ["@uv_linux_x86_64//:uv"],
|
||
|
|
}),
|
||
|
|
)
|