From 075ae9eb1eaf6fff0a325a552ad92c2e8243552a Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Fri, 31 Jul 2020 16:42:53 -0400 Subject: [PATCH] update-python-resources: add blocklist --- Library/Homebrew/utils/pypi.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Library/Homebrew/utils/pypi.rb b/Library/Homebrew/utils/pypi.rb index acc3573a6c..ac3800da97 100644 --- a/Library/Homebrew/utils/pypi.rb +++ b/Library/Homebrew/utils/pypi.rb @@ -5,6 +5,12 @@ module PyPI PYTHONHOSTED_URL_PREFIX = "https://files.pythonhosted.org/packages/" + AUTOMATIC_RESOURCE_UPDATE_BLOCKLIST = %w[ + diffoscope + dxpy + molecule + ].freeze + @pipgrip_installed = nil def url_to_pypi_package_name(url) @@ -41,6 +47,11 @@ module PyPI def update_python_resources!(formula, version = nil, print_only: false, silent: false, ignore_non_pypi_packages: false) + if !print_only && AUTOMATIC_RESOURCE_UPDATE_BLOCKLIST.include?(formula.name) + odie "The resources for \"#{formula.name}\" need special attention. Please update them manually." + return + end + # PyPI package name isn't always the same as the formula name. Try to infer from the URL. pypi_name = if formula.stable.url.start_with?(PYTHONHOSTED_URL_PREFIX) url_to_pypi_package_name formula.stable.url