Use the canonicalize_name function for finding .dist-info (#3794)

This commit is contained in:
Donald Stufft 2016-10-30 11:42:14 -04:00 committed by GitHub
parent c8e8a99b7a
commit 2743edcc77
1 changed files with 2 additions and 3 deletions

View File

@ -298,9 +298,8 @@ def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None,
continue
elif (is_base and
s.endswith('.dist-info') and
# is self.req.project_name case preserving?
s.lower().startswith(
req.name.replace('-', '_').lower())):
canonicalize_name(s).startswith(
canonicalize_name(req.name))):
assert not info_dir, ('Multiple .dist-info directories: ' +
destsubdir + ', ' +
', '.join(info_dir))