Skip to content

Commit 69c0bf7

Browse files
committed
Merge branch 'main' into refactor/pkg-aliases
2 parents 36fec60 + 1b2714e commit 69c0bf7

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ examples/py_proto_library/bazel-py_proto_library
2626
tests/integration/compile_pip_requirements/bazel-compile_pip_requirements
2727
tests/integration/ignore_root_user_error/bazel-ignore_root_user_error
2828
tests/integration/local_toolchains/bazel-local_toolchains
29+
tests/integration/py_cc_toolchain_registered/bazel-py_cc_toolchain_registered

examples/bzlmod/MODULE.bazel.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/bzlmod/tests/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ sh_test(
163163
data = [":version_default"],
164164
env = {
165165
"VERSION_CHECK": "3.9", # The default defined in the WORKSPACE.
166-
"VERSION_PY_BINARY": "$(rootpath :version_default)",
166+
"VERSION_PY_BINARY": "$(rootpaths :version_default)",
167167
},
168168
)
169169

@@ -173,7 +173,7 @@ sh_test(
173173
data = [":version_3_9"],
174174
env = {
175175
"VERSION_CHECK": "3.9",
176-
"VERSION_PY_BINARY": "$(rootpath :version_3_9)",
176+
"VERSION_PY_BINARY": "$(rootpaths :version_3_9)",
177177
},
178178
)
179179

@@ -183,6 +183,6 @@ sh_test(
183183
data = [":version_3_10"],
184184
env = {
185185
"VERSION_CHECK": "3.10",
186-
"VERSION_PY_BINARY": "$(rootpath :version_3_10)",
186+
"VERSION_PY_BINARY": "$(rootpaths :version_3_10)",
187187
},
188188
)

examples/bzlmod/tests/version_test.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616

1717
set -o errexit -o nounset -o pipefail
1818

19-
version_py_binary=$("${VERSION_PY_BINARY}")
19+
# VERSION_PY_BINARY is a space separate list of the executable and its main
20+
# py file. We just want the executable.
21+
bin=($VERSION_PY_BINARY)
22+
bin="${bin[@]//*.py}"
23+
version_py_binary=$($bin)
2024

2125
if [[ "${version_py_binary}" != "${VERSION_CHECK}" ]]; then
2226
echo >&2 "expected version '${VERSION_CHECK}' is different than returned '${version_py_binary}'"

python/private/internal_config_repo.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def _internal_config_repo_impl(rctx):
6868
else:
6969
enable_pystar = False
7070

71-
if native.bazel_version.startswith("8."):
71+
if not native.bazel_version or int(native.bazel_version.split(".")[0]) >= 8:
7272
builtin_py_info_symbol = "None"
7373
builtin_py_runtime_info_symbol = "None"
7474
builtin_py_cc_link_params_provider = "None"

0 commit comments

Comments
 (0)