Changeset 2a06644 in rtems-docs


Ignore:
Timestamp:
Feb 22, 2018, 4:23:08 PM (14 months ago)
Author:
Richard Campbell <richard.campbell@…>
Branches:
master
Children:
0472ead
Parents:
9c9ba8f
git-author:
Richard Campbell <richard.campbell@…> (02/22/18 16:23:08)
git-committer:
Joel Sherrill <joel@…> (03/09/18 19:28:45)
Message:

RTEMS Docs: Check sphinx version

Sphinx.util.compat module was removed at Sphinx version 1.7.
Imported module was not being used.

Closes #3311.

Location:
common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • common/rtemsdomain.py

    r9c9ba8f r2a06644  
    77from sphinx.directives import ObjectDescription
    88from sphinx.domains import Domain, ObjType, Index
    9 from sphinx.util.compat import Directive
    109from sphinx.util.nodes import make_refnode
    1110from sphinx.util.docfields import Field, TypedField
  • common/waf.py

    r9c9ba8f r2a06644  
    8282
    8383def check_sphinx_version(ctx, minver):
    84     version = ctx.cmd_and_log(ctx.env.BIN_SPHINX_BUILD +
     84    try:
     85        import sphinx
     86        # sphinx.version_info was introduced in sphinx ver 1.2
     87        version = sphinx.version_info
     88        # version looks like (1, 7, 0, 'final', 0))
     89        ver = version[0:2]
     90    except:
     91        try:
     92            # sphinx-build returns its version info in stderr
     93            (out, err) = ctx.cmd_and_log(ctx.env.BIN_SPHINX_BUILD +
     94                              ['--version'], output=Context.BOTH)
     95            # err looks like 'sphinx-build 1.7.0\n'
     96            version = err.split(" ")[-1:][0].strip()
     97            ver = tuple(map(int, re.split('[\D]', version)))
     98        except:
     99            try:
     100                # sphinx-build returns its version info in stdout
     101                version = ctx.cmd_and_log(ctx.env.BIN_SPHINX_BUILD +
    85102                              ['--version']).split(" ")[-1:][0].strip()
    86     try:
    87         ver = tuple(map(int, re.split('[\D]', version)))
    88     except:
    89         ctx.fatal("Sphinx version cannot be checked: %s" % version)
     103                try:
     104                    ver = tuple(map(int, re.split('[\D]', version)))
     105                except:
     106                    ctx.fatal("Sphinx version cannot be checked")
     107            except:
     108                ctx.fatal("Sphinx version cannot be checked: %s" % version)
    90109    if ver < minver:
    91110        ctx.fatal("Sphinx version is too old: %s" % ".".join(map(str, ver)))
Note: See TracChangeset for help on using the changeset viewer.