You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: python/private/pypi/extension.bzl
+13-8Lines changed: 13 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -493,20 +493,21 @@ Will always include `"any"` even if it is not specified.
493
493
494
494
The items in this list can contain a single `*` character that is equivalent to matching the
495
495
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.
502
497
503
498
:::{note}
504
499
We select a single wheel and the last match will take precedence, if the platform_tag that we
505
500
match has a version component (e.g. `android_x_arch`, then the version `x` will be used in the
506
501
matching algorithm).
507
502
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.
510
511
:::
511
512
512
513
:::{note}
@@ -522,6 +523,10 @@ latest format.
522
523
:::{seealso}
523
524
See official [docs](https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#platform-tag) for more information.
524
525
:::
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.
0 commit comments