aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pkg_resources.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index b7826c4b..5d7592eb 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -755,6 +755,15 @@ def find_distributions(path_item):
return finder(importer,path_item)
+def find_in_zip(importer,path_item):
+ # for now, we only yield the .egg file itself, if applicable;
+ # i.e., we don't support "baskets" yet, just eggs
+ for item in find_on_path(importer,path_item):
+ yield item
+
+register_finder(zipimport.zipimporter,find_in_zip)
+
+
def StringIO(*args, **kw):
"""Thunk to load the real StringIO on demand"""
global StringIO
@@ -770,13 +779,6 @@ def StringIO(*args, **kw):
-
-
-
-
-
-
-
def find_nothing(importer,path_item):
return ()