update-python-resources: add blocklist
This commit is contained in:
		
							parent
							
								
									5ebb5fa1a6
								
							
						
					
					
						commit
						075ae9eb1e
					
				@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user