Skip to content

Commit bf33f79

Browse files
committed
Fix canonicalization
1 parent 22b81c4 commit bf33f79

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

setuptools/dist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ def run_command(self, command):
973973
def _override_get_fullname(self):
974974
def _get_fullname_canonicalized(self):
975975
return "{}-{}".format(
976-
canonicalize_name(self.get_name()),
976+
canonicalize_name(self.get_name()).replace('-', '_'),
977977
canonicalize_version(self.get_version()),
978978
)
979979

setuptools/tests/test_config_discovery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def test_build_with_discovered_name(self, tmp_path):
278278
_run_build(tmp_path, "--sdist")
279279
# Expected distribution file
280280
dist_file = (
281-
tmp_path / f"dist/ns-nested-pkg-{self.CANONICAL_DEFAULT_VERSION}.tar.gz"
281+
tmp_path / f"dist/ns_nested_pkg-{self.CANONICAL_DEFAULT_VERSION}.tar.gz"
282282
)
283283
assert dist_file.is_file()
284284

0 commit comments

Comments
 (0)