Commit a95cd91d authored by Jason R. Coombs's avatar Jason R. Coombs

Assign dists just once

parent 7e173ffb
...@@ -2049,16 +2049,16 @@ def find_on_path(importer, path_item, only=False): ...@@ -2049,16 +2049,16 @@ def find_on_path(importer, path_item, only=False):
for entry in path_item_entries: for entry in path_item_entries:
lower = entry.lower() lower = entry.lower()
fullpath = os.path.join(path_item, entry) fullpath = os.path.join(path_item, entry)
if lower.endswith('.egg-info') or lower.endswith('.dist-info'): dists = (
dists = distributions_from_metadata(fullpath) distributions_from_metadata(fullpath)
for dist in dists: if lower.endswith('.egg-info')
yield dist or lower.endswith('.dist-info') else
elif not only and _is_egg_path(entry): find_distributions(fullpath)
dists = find_distributions(fullpath) if not only and _is_egg_path(entry) else
for dist in dists: resolve_egg_link(fullpath)
yield dist if not only and lower.endswith('.egg-link') else
elif not only and lower.endswith('.egg-link'): ()
dists = resolve_egg_link(fullpath) )
for dist in dists: for dist in dists:
yield dist yield dist
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment