diff --git a/cython_use_imgmath.patch b/cython_use_imgmath.patch new file mode 100644 index 0000000..1ca6ff3 --- /dev/null +++ b/cython_use_imgmath.patch @@ -0,0 +1,33 @@ +From 452627ce99f3fa180f85838b8208a3cb3fcf0b71 Mon Sep 17 00:00:00 2001 +From: Stefan Behnel +Date: Sun, 27 Jan 2019 16:43:41 +0100 +Subject: [PATCH] Docs: switch from outdated "pngmath" sphinx package to + "imgmath", and use "svg" as output format. See #2818. + +--- + docs/conf.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/docs/conf.py b/docs/conf.py +index 10662e28ca..c20a57574e 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -41,7 +41,7 @@ + extensions = [ + 'ipython_console_highlighting', + 'cython_highlighting', +- 'sphinx.ext.pngmath', ++ 'sphinx.ext.imgmath', + 'sphinx.ext.todo', + 'sphinx.ext.intersphinx', + 'sphinx.ext.autodoc' +@@ -132,6 +132,9 @@ + # If true, keep warnings as "system message" paragraphs in the built documents. + #keep_warnings = False + ++# The output image format. The default is 'png'. It should be either 'png' or 'svg'. ++imgmath_image_format = "svg" ++ + + # -- Options for HTML output --------------------------------------------------- + diff --git a/python-Cython-doc.changes b/python-Cython-doc.changes index 9856330..57a70f5 100644 --- a/python-Cython-doc.changes +++ b/python-Cython-doc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Apr 2 16:08:29 UTC 2019 - Todd R + +- Add cython_use_imgmath.patch + The pngmath Sphinx extension has been removed. Use imgmath instead. + See: gh#cython/cython#2818 + ------------------------------------------------------------------- Thu Feb 28 15:30:08 UTC 2019 - Ondřej Súkup diff --git a/python-Cython-doc.spec b/python-Cython-doc.spec index 9530147..2a49774 100644 --- a/python-Cython-doc.spec +++ b/python-Cython-doc.spec @@ -28,9 +28,14 @@ Group: Documentation/Other URL: http://www.cython.org Source: https://files.pythonhosted.org/packages/source/C/Cython/Cython-%{version}.tar.gz Source1: python-Cython-rpmlintrc +# PATCH-FIX-UPSTREAM -- cython_use_imgmath.patch -- Don't use removed pngmath Sphinx extension -- gh#cython/cython#2818 +Patch0: cython_use_imgmath.patch BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-Sphinx +BuildRequires: python3-Sphinx-latex +BuildRequires: texlive-dvipng +BuildRequires: texlive-latex BuildArch: noarch %if %{with test} BuildRequires: %{python_module Cython = %{version}} @@ -49,6 +54,7 @@ allows the compiler to generate very efficient C code from Cython code. %prep %setup -q -n Cython-%{version} +%patch0 -p1 # Fix EOL encoding sed -i "s|\r||" Demos/callback/{README.rst,cheesefinder.h} Demos/embed/Makefile.{unix,msc.static} # Remove tests broken with new gcc @@ -60,6 +66,7 @@ python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo %install mkdir -p %{buildroot}%{_docdir}/python-Cython cp -r build/sphinx/html %{buildroot}%{_docdir}/python-Cython +sed -i 's/\r$//' %{buildroot}%{_docdir}/python-Cython/html/_sources/examples/README.rst.txt %fdupes %{buildroot}%{_docdir}/python-Cython %if %{with test} diff --git a/python-Cython.changes b/python-Cython.changes index 3a208f2..295ebfa 100644 --- a/python-Cython.changes +++ b/python-Cython.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Apr 2 16:08:29 UTC 2019 - Todd R + +- Add cython_use_imgmath.patch + The pngmath Sphinx extension has been removed. Use imgmath instead. + See: gh#cython/cython#2818 + ------------------------------------------------------------------- Thu Feb 28 15:30:08 UTC 2019 - Ondřej Súkup diff --git a/python-Cython.spec b/python-Cython.spec index 93ccb34..846ea9d 100644 --- a/python-Cython.spec +++ b/python-Cython.spec @@ -27,6 +27,8 @@ Group: Development/Languages/Python URL: http://www.cython.org Source: https://files.pythonhosted.org/packages/source/C/Cython/Cython-%{version}.tar.gz Source1: python-Cython-rpmlintrc +# PATCH-FIX-UPSTREAM -- cython_use_imgmath.patch -- Don't use removed pngmath Sphinx extension -- gh#cython/cython#2818 +Patch0: cython_use_imgmath.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module xml} BuildRequires: fdupes @@ -54,6 +56,7 @@ allows the compiler to generate very efficient C code from Cython code. %prep %setup -q -n Cython-%{version} +%patch0 -p1 # Fix non-executable scripts sed -i "s|^#!.*||" Cython/Debugger/{libpython,Cygdb}.py cython.py