aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pkg_resources/__init__.py')
-rw-r--r--pkg_resources/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 87568c2e..d9664adc 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -2049,10 +2049,10 @@ def find_on_path(importer, path_item, only=False):
for entry in path_item_entries:
lower = entry.lower()
fullpath = os.path.join(path_item, entry)
+ is_meta = any(map(lower.endswith, ('.egg-info', '.dist-info')))
dists = (
distributions_from_metadata(fullpath)
- if lower.endswith('.egg-info')
- or lower.endswith('.dist-info') else
+ if is_meta else
find_distributions(fullpath)
if not only and _is_egg_path(entry) else
resolve_egg_link(fullpath)