python: don't assume resources have URLs

Signed-off-by: William Woodruff <william@yossarian.net>
This commit is contained in:
William Woodruff 2024-07-30 09:51:33 -04:00
parent c6ba4844b3
commit 9804e58ceb
No known key found for this signature in database

View File

@ -365,7 +365,7 @@ module Language
def pip_install(targets, build_isolation: true) def pip_install(targets, build_isolation: true)
targets = Array(targets) targets = Array(targets)
targets.each do |t| targets.each do |t|
if t.is_a?(Resource) && t.url.end_with?("-none-any.whl") if t.is_a?(Resource) && t.url&.end_with?("-none-any.whl")
t.stage { do_install(Pathname.pwd/t.downloader.basename, build_isolation:) } t.stage { do_install(Pathname.pwd/t.downloader.basename, build_isolation:) }
elsif t.is_a?(Resource) elsif t.is_a?(Resource)
t.stage { do_install(Pathname.pwd, build_isolation:) } t.stage { do_install(Pathname.pwd, build_isolation:) }