From 575592d7f9846ce050310c3bf153fc9cc0e62556 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Tue, 30 Jul 2024 11:38:07 -0400 Subject: [PATCH] Update Library/Homebrew/language/python.rb Co-authored-by: Bo Anderson --- Library/Homebrew/language/python.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/language/python.rb b/Library/Homebrew/language/python.rb index 431a0ed934..05a4ef5915 100644 --- a/Library/Homebrew/language/python.rb +++ b/Library/Homebrew/language/python.rb @@ -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:)