mirror of
https://git.rtems.org/rtems-docs/
synced 2025-05-15 18:06:41 +08:00
common/waf.py: Improve Sphinx version parsing to work with their git master
This commit is contained in:
parent
f233256327
commit
be428d186c
@ -1,4 +1,4 @@
|
|||||||
import sys, os
|
import sys, os, re
|
||||||
from waflib.Build import BuildContext
|
from waflib.Build import BuildContext
|
||||||
|
|
||||||
sphinx_min_version = (1,3)
|
sphinx_min_version = (1,3)
|
||||||
@ -53,7 +53,7 @@ class linkcheck(BuildContext):
|
|||||||
def check_sphinx_version(ctx, minver):
|
def check_sphinx_version(ctx, minver):
|
||||||
version = ctx.cmd_and_log(ctx.env.BIN_SPHINX_BUILD + ['--version']).split(" ")[-1:][0].strip()
|
version = ctx.cmd_and_log(ctx.env.BIN_SPHINX_BUILD + ['--version']).split(" ")[-1:][0].strip()
|
||||||
try:
|
try:
|
||||||
ver = tuple(map(int, version.split(".")))
|
ver = tuple(map(int, re.split('[\D]', version)))
|
||||||
except:
|
except:
|
||||||
ctx.fatal("Sphinx version cannot be checked: %s" % version)
|
ctx.fatal("Sphinx version cannot be checked: %s" % version)
|
||||||
if ver < minver:
|
if ver < minver:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user