Skip to content

Commit e6f9ee9

Browse files
committed
In installer, when discovering egg dists, let metadata discovery search each egg.
Closes #4998
1 parent 76d2923 commit e6f9ee9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

newsfragments/4998.bugfix.1.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
In installer, when discovering egg dists, let metadata discovery search each egg.

setuptools/installer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ def _fetch_build_egg_no_warn(dist, req): # noqa: C901 # is too complex (16) #
9292
if dist.dependency_links:
9393
find_links.extend(dist.dependency_links)
9494
eggs_dir = os.path.realpath(dist.get_egg_cache_dir())
95-
cached_dists = metadata.Distribution.discover(
96-
path=glob.glob(f'{eggs_dir}/*.egg/EGG-INFO')
97-
)
95+
cached_dists = metadata.Distribution.discover(path=glob.glob(f'{eggs_dir}/*.egg'))
9896
for egg_dist in cached_dists:
9997
if _dist_matches_req(egg_dist, req):
10098
return egg_dist

0 commit comments

Comments
 (0)