Skip to content

Commit 3949cca

Browse files
rickeylevgemini-code-assist[bot]aignas
committed
chore: have no-matching-distribution error message hint about target_platforms vs requirements_by_platform (bazel-contrib#3701)
Based on the slack discussion where a cross-build was failing because `requirements_by_platform` was set, but `target_platforms` wasn't set, have the error message hint at the distinction to better point users for how to fix it. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com> (cherry picked from commit 6e72de2)
1 parent 7171c57 commit 3949cca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python/private/pypi/pkg_aliases.bzl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,17 @@ load(
4646
)
4747

4848
_NO_MATCH_ERROR_TEMPLATE = """\
49-
No matching wheel for current configuration's Python version.
49+
No matching wheel for current configuration's Python version and platform.
5050
5151
The current build configuration's Python version doesn't match any of the Python
5252
wheels available for this distribution. This distribution supports the following Python
5353
configuration settings:
5454
{config_settings}
5555
56+
As configured by the `pip.parse.target_platforms` attribute. Note that
57+
`requirements_by_platform` only affects the Bazel host platform unless
58+
`target_platforms` is also set.
59+
5660
To determine the current configuration's Python version, run:
5761
`bazel config <config id>` (shown further below)
5862

0 commit comments

Comments
 (0)