Skip to content

Commit 2722109

Browse files
committed
change: always select the lowest
1 parent ae40e32 commit 2722109

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

python/private/pypi/select_whl.bzl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ def _platform_tag_priority(*, tag, values):
4646
arch = tail
4747
version = (int(major), int(minor))
4848

49-
select_highest = True
50-
5149
keys = []
5250
for priority, wp in enumerate(values):
5351
want_os, sep, tail = wp.partition("_")
@@ -67,7 +65,6 @@ def _platform_tag_priority(*, tag, values):
6765
want_major = ""
6866
want_minor = ""
6967
want_arch = tail
70-
select_highest = False
7168
elif os.startswith(_ANDROID):
7269
# we set it to `0` above, so setting the `want_minor` her to `0` will make things
7370
# consistent.
@@ -84,7 +81,7 @@ def _platform_tag_priority(*, tag, values):
8481
# if want_major is defined, then we know that we don't have a `*` in the matcher.
8582
want_version = (int(want_major), int(want_minor)) if want_major else None
8683
if not want_version or version <= want_version:
87-
keys.append((priority, version if select_highest else (-version[0], -version[1])))
84+
keys.append((priority, (-version[0], -version[1])))
8885

8986
return max(keys) if keys else None
9087

0 commit comments

Comments
 (0)