utils/pypi: ensure pure Python wheels support py3

This commit is contained in:
Dustin Rodrigues 2025-05-20 23:08:13 -04:00
parent cdf3964753
commit 5593a5cab9
No known key found for this signature in database
GPG Key ID: 140DABE812A1491D

View File

@ -82,10 +82,10 @@ module PyPI
url["packagetype"] == "sdist"
end
# If there isn't an sdist, we use the first universal wheel.
# If there isn't an sdist, we use the first pure Python3 or universal wheel
if dist.nil?
dist = json["urls"].find do |url|
url["filename"].end_with?("-none-any.whl")
url["filename"].end_with?("py3-none-any.whl")
end
end