Fix broken pip package might mess up requirements detection

This commit is contained in:
allegroai 2022-11-11 23:46:33 +02:00
parent 7f6c80f292
commit f6238b8a0f

View File

@ -380,6 +380,11 @@ def _search_path(path):
for file in os.listdir(path):
# Install from PYPI.
# broken pip packages might start with '~' - ignore it
if str(file).startswith('~'):
continue
if fnmatch.fnmatch(file, '*-info'):
pkg_name, version = file.split('-')[:2]
if version.endswith('dist'):