2022-09-14 02:24:34 +00:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
|
2022-09-15 01:07:51 +00:00
|
|
|
# Python stuff
|
2022-09-14 02:24:34 +00:00
|
|
|
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",
|
|
|
|
)
|
|
|
|
|
2022-09-15 01:07:51 +00:00
|
|
|
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
|
|
|
|
load("@rules_python//python:pip.bzl", "pip_install")
|
|
|
|
|
2022-09-14 02:24:34 +00:00
|
|
|
python_register_toolchains(
|
2022-09-15 01:07:51 +00:00
|
|
|
name = "python39",
|
|
|
|
python_version = "3.9.12",
|
2022-09-14 02:24:34 +00:00
|
|
|
)
|
|
|
|
|
2022-09-15 01:07:51 +00:00
|
|
|
load("@python39//:defs.bzl", "interpreter")
|
|
|
|
|
2022-09-14 02:24:34 +00:00
|
|
|
pip_install(
|
|
|
|
name = "my_deps",
|
|
|
|
python_interpreter_target = interpreter,
|
|
|
|
requirements = "//:requirements.txt"
|
|
|
|
)
|
|
|
|
|
2022-09-15 01:07:51 +00:00
|
|
|
|
|
|
|
# Docker stuff
|
2022-09-14 02:24:34 +00:00
|
|
|
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"],
|
|
|
|
)
|
|
|
|
|
2022-09-15 01:07:51 +00:00
|
|
|
# load("@io_bazel_rules_docker//toolchains/docker:toolchain.bzl",
|
|
|
|
# docker_toolchain_configure = "toolchain_configure"
|
|
|
|
# )
|
|
|
|
|
|
|
|
# docker_toolchain_configure(
|
|
|
|
# name = "docker_config",
|
|
|
|
# client_config = "@//:.docker-config.json",
|
|
|
|
# )
|
|
|
|
|
|
|
|
load(
|
|
|
|
"@io_bazel_rules_docker//repositories:repositories.bzl",
|
|
|
|
container_repositories = "repositories",
|
2022-09-14 02:24:34 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
container_repositories()
|
|
|
|
|
2022-09-15 01:07:51 +00:00
|
|
|
load("@io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps")
|
|
|
|
|
2022-09-14 02:24:34 +00:00
|
|
|
container_deps()
|
2022-09-15 01:07:51 +00:00
|
|
|
|
|
|
|
load(
|
|
|
|
"@io_bazel_rules_docker//python3:image.bzl",
|
|
|
|
_py_image_repos = "repositories",
|
|
|
|
)
|
|
|
|
|
|
|
|
_py_image_repos()
|