From d23ef60e7364a049c481ce22f1c631b745c9e70f Mon Sep 17 00:00:00 2001 From: vlefevre Date: Wed, 11 Mar 2020 09:29:49 +0000 Subject: [tools/mpfrlint] Workaround to Debian bug 953369 in libpython3.8-minimal for the codespell invocation. (merged changeset r13759 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13770 280ebfd0-de03-0410-8827-d642c229c3f4 --- tools/mpfrlint | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/mpfrlint b/tools/mpfrlint index 2020e7fa6..78036baf4 100755 --- a/tools/mpfrlint +++ b/tools/mpfrlint @@ -464,9 +464,16 @@ EOF if which codespell > /dev/null 2> /dev/null; then doc=(FAQ.html Makefile.am README.dev add-with-carry.c check-typography \ faq.xsl fdl.texi mini-gmp mpfr.texi sum.txt update-faq) - err-if-output "codespell" codespell ${term:+--enable-colors} \ + cscmd=(codespell ${term:+--enable-colors} \ -q3 -I codespell.ignore -x codespell.exclude \ - AUTHORS BUGS INSTALL NEWS README TODO doc/${^doc} examples $srctests + AUTHORS BUGS INSTALL NEWS README TODO doc/${^doc} examples $srctests) + if test -z "$(codespell /dev/null 2>&1 > /dev/null)"; then + err-if-output "codespell" $cscmd + else + # Workaround to Debian bug 953369 in libpython3.8-minimal + $cscmd |& err-if-output -t "codespell" grep -Ev \ + "RuntimeWarning: line buffering|file = builtins.open" + fi else echo "Warning! codespell is not installed. Cannot check spelling." >&2 fi -- cgit v1.2.1