From bc6144192259a00f513afdd4f516d85384a3243d Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Wed, 28 Mar 2018 18:55:15 -0400 Subject: [PATCH] Skip unsupported extensions - Always skip unsupported extensions (like .egg) even when passing `ignore_compatibility=True` --- pipenv/patched/notpip/index.py | 3 ++- pipenv/patched/notpip/req/req_set.py | 18 ++---------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/pipenv/patched/notpip/index.py b/pipenv/patched/notpip/index.py index f8f313e4..48aaa35f 100644 --- a/pipenv/patched/notpip/index.py +++ b/pipenv/patched/notpip/index.py @@ -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 diff --git a/pipenv/patched/notpip/req/req_set.py b/pipenv/patched/notpip/req/req_set.py index fb999ab9..75766bba 100644 --- a/pipenv/patched/notpip/req/req_set.py +++ b/pipenv/patched/notpip/req/req_set.py @@ -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):