diff --git a/Library/Homebrew/utils/pypi.rb b/Library/Homebrew/utils/pypi.rb index d85ecc7800..3193698b8a 100644 --- a/Library/Homebrew/utils/pypi.rb +++ b/Library/Homebrew/utils/pypi.rb @@ -286,6 +286,8 @@ module PyPI end def self.normalize_python_package(name) + # This normalization is defined in the PyPA packaging specifications; + # https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization name.gsub(/[-_.]+/, "-").downcase end