summaryrefslogtreecommitdiff
path: root/setuptools/command/egg_info.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2022-02-06 11:20:38 -0500
committerJason R. Coombs <jaraco@jaraco.com>2022-02-06 13:38:30 -0500
commitff3447a694f3b08dae8bd5268e64aa43f05a47a9 (patch)
treebe63ea0efbdd308ba976a3d9ab26e3e30c9f113f /setuptools/command/egg_info.py
parent988bf129164b8d46985c4d8b150086eedd95e37d (diff)
downloadpython-setuptools-git-ff3447a694f3b08dae8bd5268e64aa43f05a47a9.tar.gz
Migrate remainder of 'iter_entry_points' to importlib_metadata.
Diffstat (limited to 'setuptools/command/egg_info.py')
-rw-r--r--setuptools/command/egg_info.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index 379f9398..d0e73002 100644
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -17,6 +17,8 @@ import warnings
import time
import collections
+from .._importlib import metadata
+
from setuptools import Command
from setuptools.command.sdist import sdist
from setuptools.command.sdist import walk_revctrl
@@ -24,7 +26,7 @@ from setuptools.command.setopt import edit_config
from setuptools.command import bdist_egg
from pkg_resources import (
Requirement, safe_name, parse_version,
- safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename)
+ safe_version, yield_lines, EntryPoint, to_filename)
import setuptools.unicode_utils as unicode_utils
from setuptools.glob import glob
@@ -281,10 +283,9 @@ class egg_info(InfoCommon, Command):
def run(self):
self.mkpath(self.egg_info)
os.utime(self.egg_info, None)
- installer = self.distribution.fetch_build_egg
- for ep in iter_entry_points('egg_info.writers'):
- ep.require(installer=installer)
- writer = ep.resolve()
+ for ep in metadata.entry_points(group='egg_info.writers'):
+ self.distribution._install_dependencies(ep)
+ writer = ep.load()
writer(self, ep.name, os.path.join(self.egg_info, ep.name))
# Get rid of native_libs.txt if it was put there by older bdist_egg