build/python: Handle FileNotFoundError exception in sanity-check.py.
This exception was thrown while running the sanity-check on the python-isort package, which doesn't make use of a setuptools-based build system but rather of a PEP 517 compliant one. * gnu/packages/aux-files/python/sanity-check.py: Handle the FileNotFoundError whe attempting to read the 'top_level.txt' metadata file of the package. Remove extraneous 'continue' statement.master
parent
117a0de240
commit
bb557c9ac1
|
@ -51,8 +51,10 @@ for dist in ws:
|
||||||
# Try to load top level modules. This should not have any side-effects.
|
# Try to load top level modules. This should not have any side-effects.
|
||||||
try:
|
try:
|
||||||
metalines = dist.get_metadata_lines('top_level.txt')
|
metalines = dist.get_metadata_lines('top_level.txt')
|
||||||
except KeyError:
|
except (KeyError, FileNotFoundError):
|
||||||
# distutils (i.e. #:use-setuptools? #f) will not install any metadata.
|
# distutils (i.e. #:use-setuptools? #f) will not install any metadata.
|
||||||
|
# This file is also missing for packages built using a PEP 517 builder
|
||||||
|
# such as poetry.
|
||||||
print('WARNING: cannot determine top-level modules')
|
print('WARNING: cannot determine top-level modules')
|
||||||
continue
|
continue
|
||||||
for name in metalines:
|
for name in metalines:
|
||||||
|
@ -70,7 +72,6 @@ for dist in ws:
|
||||||
print('ERROR:')
|
print('ERROR:')
|
||||||
traceback.print_exc(file=sys.stdout)
|
traceback.print_exc(file=sys.stdout)
|
||||||
ret = 1
|
ret = 1
|
||||||
continue
|
|
||||||
|
|
||||||
# Try to load entry points of console scripts too, making sure they
|
# Try to load entry points of console scripts too, making sure they
|
||||||
# work. They should be removed if they don't. Other groups may not be
|
# work. They should be removed if they don't. Other groups may not be
|
||||||
|
|
Reference in New Issue