From 02a11defeb3ca7a18ad030096ee5b2ac159ea0e0 Mon Sep 17 00:00:00 2001 From: "guillaume.lambert" Date: Thu, 23 Sep 2021 09:26:37 +0200 Subject: [PATCH] Check enchant-2 exec presence in tox spelling job enchant-2 has superseded enchant (v1) in recent GNU/Linux distributions such as debian 11. We do not need to ask enchant installation if enchant-2 executable is detected on the system. Signed-off-by: guillaume.lambert Change-Id: I8b453534934737bdd11ba4e22cdf5b3e6ae62474 (cherry picked from commit d54083eb676301e1408533b64c71474666756860) --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index fdb60289c..69e2c714c 100644 --- a/tox.ini +++ b/tox.ini @@ -55,6 +55,6 @@ deps = PyEnchant whitelist_externals = sh commands = - sh -c 'command enchant>/dev/null || sudo yum -y install enchant || (echo "enchant command not found - please install it (e.g. sudo apt-get install enchant | yum install enchant )" >&2 && exit 1)' + sh -c 'command enchant>/dev/null || command enchant-2 -v>/dev/null || sudo yum -y install enchant || (echo "enchant command not found - please install it (e.g. sudo apt-get install enchant | yum install enchant )" >&2 && exit 1)' sphinx-build -q -W -b spelling -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/spelling -- 2.36.6