1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Only allow one top-level .dist-info directory in wheels

This commit is contained in:
Chris Hunt 2019-12-16 18:24:14 -05:00
parent 2472a6e51d
commit de217b54af

View file

@ -22,7 +22,6 @@ from email.parser import Parser
from pip._vendor import pkg_resources
from pip._vendor.distlib.scripts import ScriptMaker
from pip._vendor.distlib.util import get_export_entry
from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.six import StringIO
from pip._internal.exceptions import InstallationError, UnsupportedWheel
@ -381,8 +380,7 @@ def install_unpacked_wheel(
continue
elif (
is_base and
s.endswith('.dist-info') and
canonicalize_name(s).startswith(canonicalize_name(name))
s.endswith('.dist-info')
):
assert not info_dir, (
'Multiple .dist-info directories: {}, '.format(