From patchwork Fri Apr 24 21:18:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 238452 List-Id: U-Boot discussion From: xypron.glpk at gmx.de (Heinrich Schuchardt) Date: Fri, 24 Apr 2020 23:18:50 +0200 Subject: [PATCH 1/1] doc: correct detection of Sphinx version Message-ID: <20200424211850.21954-1-xypron.glpk@gmx.de> Starting with Sphinx 1.3 sphinx.ext.pngmath was replaced by sphinx.ext.imgmath. Unfortunately conf.py does not detect that version 2.4 is greater 1.3. This results in an error Could not import extension sphinx.ext.pngmath (exception: No module named 'sphinx.ext.pngmath') in Debian Bullseye which uses Sphinx 2.4 since this month. Fix the detection of the Sphinx version. Signed-off-by: Heinrich Schuchardt --- The Linux kernel starts recommending Sphinx 2.4. Cf. https://lkml.org/lkml/2020/4/14/1037 --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.26.2 diff --git a/doc/conf.py b/doc/conf.py index 0772fb6f0c..50518a4b2c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -37,7 +37,7 @@ needs_sphinx = '1.3' extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain', 'kfigure'] # The name of the math extension changed on Sphinx 1.4 -if major == 1 and minor > 3: +if major > 1 or major == 1 and minor > 3: extensions.append("sphinx.ext.imgmath") else: extensions.append("sphinx.ext.pngmath")