Merge pull request #19984 from dtrodrigues/py3-whl
utils/pypi: ensure pure Python wheels support py3
This commit is contained in:
commit
46314291ab
@ -399,7 +399,7 @@ module Language
|
||||
if t.is_a?(Resource)
|
||||
t.stage do
|
||||
target = Pathname.pwd
|
||||
target /= t.downloader.basename if t.url&.end_with?("-none-any.whl")
|
||||
target /= t.downloader.basename if t.url&.match?("[.-]py3[^-]*-none-any.whl$")
|
||||
do_install(target, build_isolation:)
|
||||
end
|
||||
else
|
||||
|
||||
@ -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"].match?("[.-]py3[^-]*-none-any.whl$")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user