Changeset 2a06644 in rtems-docs for common/waf.py
- Timestamp:
- Feb 22, 2018, 4:23:08 PM (3 years ago)
- Branches:
- 5, am, 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/waf.py
r9c9ba8f r2a06644 82 82 83 83 def 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 + 85 102 ['--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) 90 109 if ver < minver: 91 110 ctx.fatal("Sphinx version is too old: %s" % ".".join(map(str, ver)))
Note: See TracChangeset
for help on using the changeset viewer.