Skip to content

Commit

Permalink
Work around bazel's python_rules root user restriction.
Browse files Browse the repository at this point in the history
This handles bazelbuild/rules_python#1169, and hopefully fixes google#96.
  • Loading branch information
jarondl committed Oct 26, 2024
1 parent a058fed commit 8be9bcb
Show file tree
Hide file tree
Showing 2 changed files with 2,584 additions and 407 deletions.
19 changes: 19 additions & 0 deletions example_bazel/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@ module(
version = "0.6.0",
)

##############################################################################
# Workaround. By Default the python tool chain does not allow running as root.
# pkg_tar uses this toolchain.
# ughh
# https://github.com/bazelbuild/rules_python/issues/1169
bazel_dep(name = "rules_python", version = "0.37.1")

python = use_extension(
"@rules_python//python/extensions:python.bzl",
"python",
)
python.toolchain(
ignore_root_user_error = True,
is_default = True,
python_version = "3.12",
)
# End of workaround.
##############################################################################

bazel_dep(name = "rpmpack", version = "0.6.0")
local_path_override(
module_name = "rpmpack",
Expand Down
Loading

0 comments on commit 8be9bcb

Please sign in to comment.