def normalize_name(name):
    """Normalize a python package name a la PEP 503"""
    # https://www.python.org/dev/peps/pep-0503/#normalized-names
    return re.sub('[-_.]+', '-', name).lower()
Normalize a python package name a la PEP 503
product/gradle-plugin/src/main/python/pip/_vendor/distlib/util.py