Skip to content

Commit

Permalink
skip packages not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
cmacdonald committed Dec 4, 2024
1 parent 32c2ab0 commit 3168936
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/extras/generate_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ def generate_extensions():
f_ext.write(f' {display_name}\n')
continue

metadata = importlib.metadata.metadata(pkg)
try:
metadata = importlib.metadata.metadata(pkg)
except importlib.metadata.PackageNotFoundError:
print(f'Skipping {line!r} -- package not installed. You may want to run pip -r extensions.txt for a complete documentation build')
continue
pkg_name = metadata['name']
docs = importlib.resources.files(pkg).joinpath('pt_docs')
if docs.is_dir():
Expand Down

0 comments on commit 3168936

Please sign in to comment.