Skip to content

Commit

Permalink
Trac #33608: Building documentation is broken in Sage 9.6.beta6
Browse files Browse the repository at this point in the history
Building the documentation is currently broken and fails with the
following error messages:

$ make doc-clean; make doc-uninstall; make
{{{
...
[sagemath_doc_html-none] [semirings] building [html]: targets for 3
source files that are out of date
[sagemath_doc_html-none] [semirings] dumping search index in English
(code: en)... done
[sagemath_doc_html-none] [semirings] The HTML pages are in
../../home/gitpod/sage-local/share/doc/sage/html/en/reference/semirings.
[sagemath_doc_html-none] [semirings] Extension error
(matplotlib.sphinxext.plot_directive):
[sagemath_doc_html-none] [semirings] Handler <function _copy_css_file at
0x7f0673973e50> for event 'build-finished' threw an exception
(exception: [Errno 17] File exists: '/home/gitpod/sage-
local/share/doc/sage/html/en/reference/semirings/_static')
[sagemath_doc_html-none] Build finished. The built documents can be
found in /home/gitpod/sage-
local/share/doc/sage/html/en/reference/semirings
...
}}}

URL: https://trac.sagemath.org/33608
Reported by: gh-tobiasdiez
Ticket author(s): Kwankyu Lee
Reviewer(s): Tobias Diez
  • Loading branch information
Release Manager committed Apr 2, 2022
2 parents 88e25dd + 0618873 commit b438a78
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/sage_docbuild/ext/multidocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def citation_dir(app: Sphinx) -> Path:
if dirs[0] == '/':
dirs.pop(0)
tail = dirs[1:]
citedir = (sage_doc / "inventory").joinpath(*tail)
citedir = (sage_doc / "inventory").joinpath(*tail)
else:
citedir = outdir / "inventory"
os.makedirs(citedir, exist_ok=True)
Expand Down Expand Up @@ -303,6 +303,10 @@ def copy_static_files(self):
shutil.rmtree(static_dir)
except OSError:
os.unlink(static_dir)
# This ensures that the symlink we are creating points to an
# existing directory. See trac #33608.
os.makedirs(os.path.join(app.builder.outdir, master_static_dir),
exist_ok=True)
os.symlink(master_static_dir, static_dir)

app.builder.copy_static_files = link_static_files
Expand All @@ -313,10 +317,9 @@ def copy_static_files(self):
app.emit('env-check-consistency', app.env)



def setup(app: Sphinx):
app.add_config_value('multidocs_is_master', True, True)
app.add_config_value('multidocs_subdoc_list', [], True)
app.add_config_value('multidoc_first_pass', 0, False) # 1 = deactivate the loading of the inventory
app.connect('builder-inited', init_subdoc)
return {'parallel_read_safe': True}
return {'parallel_read_safe': True}

0 comments on commit b438a78

Please sign in to comment.