Allow building when Python lib cannot be chowned When building Gerrit on MacOS and bazel mods, the build may fail with: "Error in fail: Failed to make interpreter installation read-only. 'chmod' error msg" The error happens when trying to perform a chmod of the Python lib, which the current user may not have permission to change. Relaxing the ignore_root_user_error flag solves the problem. The associated Bazel issue at [1] and has later fixed with [2]. [1] https://github.com/bazel-contrib/rules_python/issues/2016 [2] https://github.com/bazel-contrib/rules_python/pull/3421 Release-Notes: skip Change-Id: I326025b80a644a2a485ee936b4cfe1429d9d81f2
diff --git a/MODULE.bazel b/MODULE.bazel index 0f4ec27..deec431 100644 --- a/MODULE.bazel +++ b/MODULE.bazel
@@ -8,6 +8,7 @@ bazel_dep(name = "rules_java", version = "7.6.1") bazel_dep(name = "toolchains_protoc", version = "0.3.0") bazel_dep(name = "rules_proto", version = "6.0.0") +bazel_dep(name = "rules_python", version = "1.8.0-rc1") bazel_dep(name = "jgit") local_path_override(
diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 54c00eb..6981716af 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock
@@ -240,7 +240,7 @@ ], "distutils_content": "", "strip_prefix": "python", - "ignore_root_user_error": false + "ignore_root_user_error": true } }, "python_3_11_aarch64-unknown-linux-gnu": { @@ -257,7 +257,7 @@ ], "distutils_content": "", "strip_prefix": "python", - "ignore_root_user_error": false + "ignore_root_user_error": true } }, "python_3_11_x86_64-apple-darwin": { @@ -274,7 +274,7 @@ ], "distutils_content": "", "strip_prefix": "python", - "ignore_root_user_error": false + "ignore_root_user_error": true } }, "python_3_11_x86_64-pc-windows-msvc": { @@ -291,7 +291,7 @@ ], "distutils_content": "", "strip_prefix": "python", - "ignore_root_user_error": false + "ignore_root_user_error": true } }, "python_3_11_x86_64-unknown-linux-gnu": { @@ -308,7 +308,7 @@ ], "distutils_content": "", "strip_prefix": "python", - "ignore_root_user_error": false + "ignore_root_user_error": true } }, "python_3_11": {