Update Library/Homebrew/language/python.rb

Co-authored-by: Bo Anderson <mail@boanderson.me>
This commit is contained in:
William Woodruff 2024-07-30 11:38:07 -04:00 committed by GitHub
parent 9804e58ceb
commit 575592d7f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -365,10 +365,12 @@ module Language
def pip_install(targets, build_isolation: true)
targets = Array(targets)
targets.each do |t|
if t.is_a?(Resource) && t.url&.end_with?("-none-any.whl")
t.stage { do_install(Pathname.pwd/t.downloader.basename, build_isolation:) }
elsif t.is_a?(Resource)
t.stage { do_install(Pathname.pwd, build_isolation:) }
if t.is_a?(Resource)
t.stage do
target = Pathname.pwd
target /= t.downloader.basename if t.url&.end_with?("-none-any.whl")
do_install(target, build_isolation:)
end
else
t = t.lines.map(&:strip) if t.is_a?(String) && t.include?("\n")
do_install(t, build_isolation:)