- instead of throwing exception, return empty sequence
if the dist is not on the filie system
This commit is contained in:
parent
1860140460
commit
b5a72c30da
|
@ -1125,11 +1125,21 @@ class Config:
|
||||||
# We don't autoload from setuptools entry points, no need to continue.
|
# We don't autoload from setuptools entry points, no need to continue.
|
||||||
return
|
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 = (
|
package_files = (
|
||||||
str(file)
|
str(file)
|
||||||
for dist in importlib_metadata.distributions()
|
for dist in importlib_metadata.distributions()
|
||||||
if any(ep.group == "pytest11" for ep in dist.entry_points)
|
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):
|
for name in _iter_rewritable_modules(package_files):
|
||||||
|
|
Loading…
Reference in New Issue