my-homepage/WORKSPACE

49 lines
1.5 KiB
Python

#workspace("my-homepage")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
load("@python310//:defs.bzl", "interpreter")
load("@rules_python//python:pip.bzl", "pip_install")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@io_bazel_rules_docker//toolchains/docker:toolchain.bzl",
docker_toolchain_configure="toolchain_configure"
)
load(
"@io_bazel_rules_docker//repositories:repositories.bzl",
container_repositories = "repositories",
)
load("@io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps")
http_archive(
name = "rules_python",
sha256 = "b593d13bb43c94ce94b483c2858e53a9b811f6f10e1e0eedc61073bd90e58d9c",
strip_prefix = "rules_python-0.12.0",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.12.0.tar.gz",
)
python_register_toolchains(
name = "python310",
python_version = "3.10.6",
)
pip_install(
name = "my_deps",
python_interpreter_target = interpreter,
requirements = "//:requirements.txt"
)
http_archive(
name = "io_bazel_rules_docker",
sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.25.0/rules_docker-v0.25.0.tar.gz"],
)
docker_toolchain_configure(
name = "docker_config",
client_config = ":.docker-config.json",
)
container_repositories()
container_deps()