Skip to content

Commit 6b1fc22

Browse files
committed
update docs
1 parent 585ccd8 commit 6b1fc22

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

python/private/pypi/extension.bzl

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -493,20 +493,21 @@ Will always include `"any"` even if it is not specified.
493493
494494
The items in this list can contain a single `*` character that is equivalent to matching the
495495
lowest available version component in the platform_tag. Note, if the wheel platform tag does not
496-
have a version component, e.g. `linux_x86_64` or `win_amd64`, then `*` will act as a lower bound
497-
for the platform version, i.e. `musllinux_1_2_x86_64` means select a wheel that is built for
498-
`muslc` 1.2 or greater, i.e. prefer `musllinux_1_2_x86_64` over `musllinux_1_3_x86_64` over `musllinux_1_4_x86_64` and so on, but exclude `musllinux_1_1_x86_64` and lower.
499-
500-
We will always select the lowest available `platform_tag` version that is compatible with the
501-
target platform.
496+
have a version component, e.g. `linux_x86_64` or `win_amd64`, then `*` will act as a regular character.
502497
503498
:::{note}
504499
We select a single wheel and the last match will take precedence, if the platform_tag that we
505500
match has a version component (e.g. `android_x_arch`, then the version `x` will be used in the
506501
matching algorithm).
507502
508-
If the matcher you provide has `*`, then we will match a wheel with the highest available target platform, i.e. if `musllinux_1_1_arch` and `musllinux_1_2_arch` are both present, then we will select `musllinux_1_2_arch`.
509-
Otherwise we will select the highest available version that is equal or lower to the specifier, i.e. if `manylinux_2_12` and `manylinux_2_17` wheels are present and the matcher is `manylinux_2_15`, then we will match `manylinux_2_12` but not `manylinux_2_17`.
503+
Normally, the `*` in the matcher means that we will target the lowest platform version that we can
504+
and will give preference to whls built targeting the older versions of the platform. If you
505+
specify the version, then we will use the MVS (Minimal Version Selection) algorithm to select the
506+
compatible wheel. As such, you need to keep in mind how to configure the target platforms to
507+
select a particular wheel of your preference. To sum up:
508+
* To select any wheel, use `*`.
509+
* To exclude versions up to `X.Y` - submit a PR supporting this feature.
510+
* To exclude versions above `X.Y`, provide the full platform tag specifier, e.g. `musllinux_1_2_x86_64`, which will ensure that no wheels with `musllinux_1_3_x86_64` or higher are selected.
510511
:::
511512
512513
:::{note}
@@ -522,6 +523,10 @@ latest format.
522523
:::{seealso}
523524
See official [docs](https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#platform-tag) for more information.
524525
:::
526+
:::{versionchanged} VERSION_NEXT_FEATURE
527+
The matching of versioned platforms have been switched to MVS (Minimal Version Selection)
528+
algorithm for easier evaluation logic and fewer surprises.
529+
:::
525530
""",
526531
),
527532
} | AUTH_ATTRS

0 commit comments

Comments
 (0)