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)
|
if t.is_a?(Resource)
|
||||||
t.stage do
|
t.stage do
|
||||||
target = Pathname.pwd
|
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:)
|
do_install(target, build_isolation:)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
@ -82,10 +82,10 @@ module PyPI
|
|||||||
url["packagetype"] == "sdist"
|
url["packagetype"] == "sdist"
|
||||||
end
|
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?
|
if dist.nil?
|
||||||
dist = json["urls"].find do |url|
|
dist = json["urls"].find do |url|
|
||||||
url["filename"].end_with?("-none-any.whl")
|
url["filename"].match?("[.-]py3[^-]*-none-any.whl$")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user