1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-21 03:52:16 -08:00

Fix build of manual with sphinx 2.2.1.

This version of Sphinx no longer has an info() method on the Sphinx
class, so we need to create a logger instance using sphinx.util.logging.
This commit is contained in:
Gareth Rees 2020-08-23 15:44:09 +01:00
parent 1d00afac81
commit f55112922f

View file

@ -17,6 +17,7 @@ import re
import shutil
import sys
from sphinx.util import logging
from sphinx.util.console import bold
TYPES = '''
@ -142,15 +143,17 @@ def newer(src, target):
or os.path.getmtime(target) < os.path.getmtime(src)
or os.path.getmtime(target) < os.path.getmtime(__file__))
logger = logging.getLogger(__name__)
# Mini-make
def convert_updated(app):
app.info(bold('converting MPS design documents'))
logger.info(bold('converting MPS design documents'))
for design in glob.iglob('../design/*.txt'):
name = os.path.splitext(os.path.basename(design))[0]
if name == 'index': continue
converted = 'source/design/%s.rst' % name
if newer(design, converted):
app.info('converting design %s' % name)
logger.info('converting design %s' % name)
convert_file(name, design, converted)
diagrams = chain(*[glob.iglob('../design/*.' + ext)
for ext in 'png svg'.split()])