From 0109ce58be0bc1aab5733cb424109920ccf64e6b Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Tue, 6 Oct 2020 23:22:07 -0400 Subject: [PATCH] update references to homebrew-virtualenv resources --- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 5 ++--- Library/Homebrew/language/python.rb | 2 +- Library/Homebrew/utils/pypi.rb | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index d07b1b0d84..e005a7e4c3 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -145,7 +145,7 @@ module Homebrew check_closed_pull_requests(formula, tap_full_name, version: new_version, args: args) if new_version opoo "This formula has patches that may be resolved upstream." if formula.patchlist.present? - if formula.resources.present? && formula.resources.any? { |resource| resource.name != "homebrew-virtualenv" } + if formula.resources.any? { |resource| !resource.name.start_with?("homebrew-") } opoo "This formula has resources that may need to be updated." end @@ -339,8 +339,7 @@ module Homebrew run_audit(formula, alias_rename, old_contents, args: args) pr_message = "Created with `brew bump-formula-pr`." - if resources_checked.nil? && formula.resources.present? && - formula.resources.any? { |resource| resource.name != "homebrew-virtualenv" } + if resources_checked.nil? && formula.resources.any? { |resource| !resource.name.start_with?("homebrew-") } pr_message += <<~EOS diff --git a/Library/Homebrew/language/python.rb b/Library/Homebrew/language/python.rb index fc44a7a8b2..b5523b4edf 100644 --- a/Library/Homebrew/language/python.rb +++ b/Library/Homebrew/language/python.rb @@ -289,7 +289,7 @@ module Language targets = Array(targets) targets.each do |t| if t.respond_to? :stage - next if t.name == "homebrew-virtualenv" + next if t.name.start_with? "homebrew-" t.stage { do_install Pathname.pwd } else diff --git a/Library/Homebrew/utils/pypi.rb b/Library/Homebrew/utils/pypi.rb index a2acc0bda0..eda3f66afc 100644 --- a/Library/Homebrew/utils/pypi.rb +++ b/Library/Homebrew/utils/pypi.rb @@ -142,9 +142,8 @@ module PyPI return end - # Check whether resources already exist (excluding homebrew-virtualenv) - if formula.resources.blank? || - (formula.resources.length == 1 && formula.resources.first.name == "homebrew-virtualenv") + # Check whether resources already exist (excluding virtualenv dependencies) + if formula.resources.all? { |resource| resource.name.start_with?("homebrew-") } # Place resources above install method inreplace_regex = / def install/ new_resource_blocks += " def install"