When calling _version_from_entrypoints → iter_matching_entrypoints, we should use importlib.metadata instead of pkg_resources, as pkg_resources isn’t the standard way to do this, and is also buggy in this context (see pypa/setuptools#2531)
The changes required would be pretty minimal:
requirements:
importlib_metadata; python_version < "3.8"
code:
try:
from importlib.metadata import entry_points
except ImportError:
from importlib_metadata import entry_points