summaryrefslogtreecommitdiffstats
path: root/SCons/Tool
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2025-03-12 17:04:44 (GMT)
committerMats Wichmann <mats@linux.com>2025-03-12 17:31:46 (GMT)
commitc9e65f5308caef79a1dc9476d44a25d2faba56ec (patch)
tree1ace18ecd37b7e6c030b9a666dbeaad652c228d8 /SCons/Tool
parentcd43bf7e18c30aff7c918f6ce9ee9d9fdbd63324 (diff)
downloadSCons-c9e65f5308caef79a1dc9476d44a25d2faba56ec.zip
SCons-c9e65f5308caef79a1dc9476d44a25d2faba56ec.tar.gz
SCons-c9e65f5308caef79a1dc9476d44a25d2faba56ec.tar.bz2
Exp: try to make the Windows Docbook tests better
Try to fix Windows fails on Docbook tests in case xsltproc is found. On both GitHub Actions and AppVeyor, it's found as part of StrawberryPerl, which is part of the default install. Intermittent fails seem caused by network issues (whether actual problems, or forced revectoring to https not supported by xsltproc according to some internet issue reports), so propagate two xsltproc flags for this that were in three of the "live" (named "cmd" here) tests, but not the others. Also made other parts of the setup of these tests more consistent (passing found xsltproc wasn't done) Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Tool')
-rw-r--r--SCons/Tool/docbook/__init__.py30
1 files changed, 18 insertions, 12 deletions
diff --git a/SCons/Tool/docbook/__init__.py b/SCons/Tool/docbook/__init__.py
index 3adb314..f0e9ef5 100644
--- a/SCons/Tool/docbook/__init__.py
+++ b/SCons/Tool/docbook/__init__.py
@@ -157,16 +157,22 @@ xsltproc_com_priority = ['xsltproc', 'saxon', 'saxon-xslt', 'xalan']
# TODO: Set minimum version of saxon-xslt to be 8.x (lower than this only supports xslt 1.0.
# see: https://saxon.sourceforge.net/saxon6.5.5/
# see: https://saxon.sourceforge.net/
-xsltproc_com = {'xsltproc' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE',
- 'saxon' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE $DOCBOOK_XSLTPROCPARAMS',
- # Note if saxon-xslt is version 5.5 the proper arguments are: (swap order of docbook_xsl and source)
- # 'saxon-xslt' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $SOURCE $DOCBOOK_XSL $DOCBOOK_XSLTPROCPARAMS',
- 'saxon-xslt' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE $DOCBOOK_XSLTPROCPARAMS',
- 'xalan' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -q -out $TARGET -xsl $DOCBOOK_XSL -in $SOURCE'}
-xmllint_com = {'xmllint' : '$DOCBOOK_XMLLINT $DOCBOOK_XMLLINTFLAGS --xinclude $SOURCE > $TARGET'}
-fop_com = {'fop' : '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -fo $SOURCE -pdf $TARGET',
- 'xep' : '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -valid -fo $SOURCE -pdf $TARGET',
- 'jw' : '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -f docbook -b pdf $SOURCE -o $TARGET'}
+xsltproc_com = {
+ 'xsltproc': '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE',
+ 'saxon': '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE $DOCBOOK_XSLTPROCPARAMS',
+ # Note if saxon-xslt is version 5.5 the proper arguments are: (swap order of docbook_xsl and source)
+ # 'saxon-xslt' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $SOURCE $DOCBOOK_XSL $DOCBOOK_XSLTPROCPARAMS',
+ 'saxon-xslt': '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE $DOCBOOK_XSLTPROCPARAMS',
+ 'xalan': '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -q -out $TARGET -xsl $DOCBOOK_XSL -in $SOURCE',
+}
+xmllint_com = {
+ 'xmllint': '$DOCBOOK_XMLLINT $DOCBOOK_XMLLINTFLAGS --xinclude $SOURCE > $TARGET'
+}
+fop_com = {
+ 'fop': '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -fo $SOURCE -pdf $TARGET',
+ 'xep': '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -valid -fo $SOURCE -pdf $TARGET',
+ 'jw': '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -f docbook -b pdf $SOURCE -o $TARGET',
+}
def __detect_cl_tool(env, chainkey, cdict, cpriority=None) -> None:
"""
@@ -180,11 +186,11 @@ def __detect_cl_tool(env, chainkey, cdict, cpriority=None) -> None:
cpriority = cdict.keys()
for cltool in cpriority:
if __debug_tool_location:
- print("DocBook: Looking for %s"%cltool)
+ print(f"DocBook: Looking for {cltool}")
clpath = env.WhereIs(cltool)
if clpath:
if __debug_tool_location:
- print("DocBook: Found:%s"%cltool)
+ print(f"DocBook: Found:{cltool}")
env[chainkey] = clpath
if not env[chainkey + 'COM']:
env[chainkey + 'COM'] = cdict[cltool]