52 lines
1.6 KiB
Python
52 lines
1.6 KiB
Python
module(
|
|
name = "databuild_podcast_reviews",
|
|
version = "0.1",
|
|
)
|
|
|
|
# Databuild dep - overridden so ignore version
|
|
bazel_dep(name = "databuild", version = "0.0")
|
|
local_path_override(
|
|
module_name = "databuild",
|
|
path = "../..",
|
|
)
|
|
|
|
bazel_dep(name = "rules_python", version = "1.3.0")
|
|
|
|
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
|
|
python.toolchain(
|
|
python_version = "3.13",
|
|
)
|
|
|
|
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
|
|
pip.parse(
|
|
hub_name = "pypi",
|
|
python_version = "3.13",
|
|
requirements_lock = "//:requirements_lock.txt",
|
|
)
|
|
use_repo(pip, "pypi")
|
|
|
|
# Rules OCI - necessary for producing a docker container
|
|
bazel_dep(name = "rules_oci", version = "2.2.6")
|
|
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test
|
|
|
|
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
|
|
|
|
# Declare external images you need to pull, for example:
|
|
oci.pull(
|
|
name = "debian",
|
|
image = "docker.io/library/python",
|
|
platforms = [
|
|
"linux/arm64/v8",
|
|
"linux/amd64",
|
|
],
|
|
# 'latest' is not reproducible, but it's convenient.
|
|
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
|
|
# values which you can use here in place of 'tag' to pin for reproducibility.
|
|
tag = "3.12-bookworm",
|
|
)
|
|
|
|
# For each oci.pull call, repeat the "name" here to expose them as dependencies.
|
|
use_repo(oci, "debian", "debian_linux_amd64", "debian_linux_arm64_v8")
|
|
|
|
# Platforms for specifying linux/arm
|
|
bazel_dep(name = "platforms", version = "0.0.11")
|