diff --git a/flit_core/flit_core/common.py b/flit_core/flit_core/common.py index f1f378f5..dd009f52 100644 --- a/flit_core/flit_core/common.py +++ b/flit_core/flit_core/common.py @@ -407,7 +407,7 @@ def normalize_dist_name(name: str, version: str) -> str: See https://packaging.python.org/specifications/binary-distribution-format/#escaping-and-unicode """ - normalized_name = re.sub(r'[-_.]+', '_', name, flags=re.UNICODE) + normalized_name = re.sub(r'[-_.]+', '_', name, flags=re.UNICODE).lower() assert check_version(version) == version assert '-' not in version, 'Normalized versions can’t have dashes' return '{}-{}'.format(normalized_name, version) diff --git a/tests/samples/altdistname/pyproject.toml b/tests/samples/altdistname/pyproject.toml index 00caf94c..c2d08cad 100644 --- a/tests/samples/altdistname/pyproject.toml +++ b/tests/samples/altdistname/pyproject.toml @@ -7,5 +7,5 @@ module = "package1" author = "Sir Robin" author-email = "robin@camelot.uk" home-page = "http://github.com/sirrobin/package1" -dist-name = "package-dist1" +dist-name = "package-Dist1"