- instead of throwing exception, return empty sequence

if the dist is not on the filie system
This commit is contained in:
franz 2022-01-04 14:26:31 +01:00
parent 1860140460
commit b5a72c30da
1 changed files with 11 additions and 1 deletions

View File

@ -1125,11 +1125,21 @@ class Config:
# We don't autoload from setuptools entry points, no need to continue.
return
def _get_files(dist):
#dist.files does not make sense for dists
#who are not stored on a filesystem
#at least pyoxidizer does throw a
#not implemented assertion in this case
try:
return dist.files
except NotImplementedError:
return []
package_files = (
str(file)
for dist in importlib_metadata.distributions()
if any(ep.group == "pytest11" for ep in dist.entry_points)
for file in dist.files or []
for file in _get_files(dist) or []
)
for name in _iter_rewritable_modules(package_files):