Skip to content

Commit 63555e1

Browse files
authored
fix: fix test analysis error on macOS arm64 (#2860)
Fixes: ``` ERROR: /Users/fmeum/git/rules_python/tests/pypi/env_marker_setting/BUILD.bazel:3:30: Illegal ambiguous match on configurable attribute "platform_machine" in //tests/pypi/env_marker_setting:test_expr_python_full_version_lt_negative_subject: @@platforms//cpu:aarch64 @@platforms//cpu:arm64 Multiple matches are not allowed unless one is unambiguously more specialized or they resolve to the same value. See https://bazel.build/reference/be/functions#select. ``` Work towards #2850. Work towards #2826.
1 parent 1492ae4 commit 63555e1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python/private/pypi/pep508_env.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ platform_machine_aliases = {
2929

3030
# NOTE: There are many cpus, and unfortunately, the value isn't directly
3131
# accessible to Starlark. Using CcToolchain.cpu might work, though.
32+
# Some targets are aliases and are omitted below as their value is implied
33+
# by the target they resolve to.
3234
platform_machine_select_map = {
3335
"@platforms//cpu:aarch32": "aarch32",
3436
"@platforms//cpu:aarch64": "aarch64",
35-
"@platforms//cpu:arm": "arm",
36-
"@platforms//cpu:arm64": "arm64",
37+
# @platforms//cpu:arm is an alias for @platforms//cpu:aarch32
38+
# @platforms//cpu:arm64 is an alias for @platforms//cpu:aarch64
3739
"@platforms//cpu:arm64_32": "arm64_32",
3840
"@platforms//cpu:arm64e": "arm64e",
3941
"@platforms//cpu:armv6-m": "armv6-m",

0 commit comments

Comments
 (0)