Sphinx build script#

This is Sage’s version of the sphinx-build script. We redirect stdout and stderr to our own logger, and remove some unwanted chatter.

class sage_docbuild.sphinxbuild.SageSphinxLogger(stream, prefix)#

Bases: object

This implements the file object interface to serve as sys.stdout/sys.stderr replacement.

close()#
flush()#
isatty()#
raise_errors()#

Raise an exceptions if any errors have been found while parsing the Sphinx output.

EXAMPLES:

sage: from sys import stdout
sage: from sage_docbuild.sphinxbuild import SageSphinxLogger
sage: logger = SageSphinxLogger(stdout, "doctesting")
sage: logger._log_line("This is a SEVERE error\n")
[doctestin] This is a SEVERE error
sage: logger.raise_errors()
Traceback (most recent call last):
...
OSError: This is a SEVERE error
write(str)#
writelines(sequence)#
sage_docbuild.sphinxbuild.runsphinx()#
sage_docbuild.sphinxbuild.term_width_line(text)#