mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
bazel: provide semi-hermetic python toolchain (#1753)
The actual python version used in bazel is hermetic after this PR. However, we still require a host python toolchain for bootstrapping (this will be fixed soon upstream) and host wide glibc (+ libcrypt.so.1).
This commit is contained in:
parent
87b9d85669
commit
ab257944f9
@ -1,3 +1,17 @@
|
||||
# Python toolchain
|
||||
load("//bazel/toolchains:python_deps.bzl", "python_deps")
|
||||
|
||||
python_deps()
|
||||
|
||||
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
|
||||
|
||||
py_repositories()
|
||||
|
||||
python_register_toolchains(
|
||||
name = "python3_11",
|
||||
python_version = "3.11",
|
||||
)
|
||||
|
||||
# Go toolchain
|
||||
load("//bazel/toolchains:go_rules_deps.bzl", "go_deps")
|
||||
|
||||
|
@ -16,6 +16,8 @@ RUN chmod +x /usr/local/bin/bazelisk && \
|
||||
dnf install -y \
|
||||
git \
|
||||
diffutils \
|
||||
libxcrypt-compat \
|
||||
python3 \
|
||||
&& \
|
||||
dnf clean all && \
|
||||
groupadd --gid 1000 builder && \
|
||||
|
15
bazel/toolchains/python_deps.bzl
Normal file
15
bazel/toolchains/python_deps.bzl
Normal file
@ -0,0 +1,15 @@
|
||||
"""python toolchain rules"""
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
def python_deps():
|
||||
http_archive(
|
||||
name = "rules_python",
|
||||
sha256 = "94750828b18044533e98a129003b6a68001204038dc4749f40b195b24c38f49f",
|
||||
strip_prefix = "rules_python-0.21.0",
|
||||
urls = [
|
||||
"https://cdn.confidential.cloud/constellation/cas/sha256/94750828b18044533e98a129003b6a68001204038dc4749f40b195b24c38f49f",
|
||||
"https://github.com/bazelbuild/rules_python/releases/download/0.21.0/rules_python-0.21.0.tar.gz",
|
||||
],
|
||||
type = "tar.gz",
|
||||
)
|
Loading…
Reference in New Issue
Block a user