(name)
return re.sub('[-_.]+', '-', name).lower()
Normalize a python package name a la PEP 503
Normalize a python package name a la PEP 503
Normalize a python package name a la PEP 503
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()
def normalize_name ( name ) : # https://www.python.org/dev/peps/pep-0503/#normalized-names return re . sub ( '[-_.]+' , '-' , name ) . lower ( )