Skip unsupported extensions

- Always skip unsupported extensions (like .egg) even when
  passing `ignore_compatibility=True`
This commit is contained in:
Dan Ryan
2018-03-28 18:55:15 -04:00
parent 7697541dc0
commit bc61441922
2 changed files with 4 additions and 17 deletions
+2 -1
View File
@@ -653,7 +653,8 @@ class PackageFinder(object):
if not ext:
self._log_skipped_link(link, 'not a file')
return
if ext not in SUPPORTED_EXTENSIONS and not ignore_compatibility:
# Always ignore unsupported extensions even when we ignore compatibility
if ext not in SUPPORTED_EXTENSIONS:
self._log_skipped_link(
link, 'unsupported archive format: %s' % ext)
return
+2 -16
View File
@@ -97,11 +97,8 @@ def make_abstract_dist(req_to_install):
"""
if req_to_install.editable:
return IsSDist(req_to_install)
elif req_to_install.link:
if req_to_install.link.is_wheel:
return IsWheel(req_to_install)
elif req_to_install.link.ext == '.egg':
return IsEgg(req_to_install)
elif req_to_install.link and req_to_install.link.is_wheel:
return IsWheel(req_to_install)
else:
return IsSDist(req_to_install)
@@ -117,17 +114,6 @@ class IsWheel(DistAbstraction):
pass
# XXX: I don't know what I'm doing HALP. - uranusjr
class IsEgg(DistAbstraction):
def dist(self, finder):
return pkg_resources.Distribution.from_filename(
self.req_to_install.source_dir)
def prep_for_dist(self):
pass
class IsSDist(DistAbstraction):
def dist(self, finder):