libmypaint/Support-pngmath-replacement.patch
2020-09-22 14:11:24 +08:00

31 lines
1.3 KiB
Diff

From 22836df9bff5e5ad5d2c3e1b997cbf81b1c86466 Mon Sep 17 00:00:00 2001
From: Jesper Lloyd <jpl.lloyd@gmail.com>
Date: Mon, 10 Feb 2020 07:10:14 +0100
Subject: [PATCH] docs: Support pngmath replacement (sphinx >= 1.8)
The pngmath module was removed in favor of the imgmath module in 1.8
Thanks to avsej for drawing attention to this.
---
doc/source/conf.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 0ae986de..8d076508 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -27,7 +27,13 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode']
+
+try:
+ import sphinx.ext.pngmath
+ extensions.append('sphinx.ext.pngmath')
+except ImportError:
+ extensions.append('sphinx.ext.imgmath')
# Breathe setup, for integrating doxygen content
extensions.append('breathe')