Skip to content

Commit

Permalink
Merge pull request #98 from jarondl/bzl
Browse files Browse the repository at this point in the history
Work around bazel's python_rules root user restriction.
  • Loading branch information
jarondl authored Oct 30, 2024
2 parents a058fed + 7d7cf4d commit 2521028
Show file tree
Hide file tree
Showing 5 changed files with 2,609 additions and 431 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 2521028

Please sign in to comment.