Skip to content

Commit

Permalink
Remove unneeded .doctrees from sphinx output (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkent authored Oct 29, 2024
1 parent 4c32369 commit c5bd3b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rosdoc2/verbs/build/builders/sphinx_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,11 @@ def build(self, *, doc_build_folder, output_staging_directory):
with open(os.path.abspath(inventory_file_name) + '.location.json', 'w+') as f:
f.write(json.dumps(data))

# Sometimes sphinx generates enormous .doctree files.
# See https://github.com/sphinx-doc/sphinx/issues/11354
# These do not seem to be needed for output display, so delete them.
shutil.rmtree(os.path.join(sphinx_output_dir, '.doctrees'), ignore_errors=True)

# Return the directory into which Sphinx generated.
return sphinx_output_dir

Expand Down

0 comments on commit c5bd3b9

Please sign in to comment.