From 8d4b3dd60478611bda1eb8c8c2c7c7a50753557d Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Wed, 18 Dec 2024 16:26:00 +0100 Subject: [PATCH] [bazel] Convert bitstream workspace rule to the new python ext This python script ideally requires the jsonschema package. Signed-off-by: Amaury Pouly --- rules/bitstreams.bzl | 2 +- third_party/python/python.MODULE.bazel | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/rules/bitstreams.bzl b/rules/bitstreams.bzl index 3f94dafacf6aa..2aea0b80ccec1 100644 --- a/rules/bitstreams.bzl +++ b/rules/bitstreams.bzl @@ -110,7 +110,7 @@ bitstreams_repo = repository_rule( default = 18 * 3600, # Refresh every 18h ), "python_interpreter": attr.label( - default = "@python3_host//:python", + default = "@ot_py_for_repo//:python", allow_single_file = True, doc = "Python interpreter to use.", ), diff --git a/third_party/python/python.MODULE.bazel b/third_party/python/python.MODULE.bazel index a8735b0551f38..b0a314c9dac4d 100644 --- a/third_party/python/python.MODULE.bazel +++ b/third_party/python/python.MODULE.bazel @@ -33,6 +33,11 @@ use_repo(pip, "ot_python_deps") # List of dependencies that need to used during the loading phase # by repository rules. REPO_RULES_PIP_DEPS = [ + # Direct dependencies: + "jsonschema", # In rules/scripts/bitstreams_workspace.py + # Transitive dependencies: + "attrs", # For jsonschema + "pyrsistent", # For jsonschema ] # Ask bazel to use all repositories created by rules_python so we