diff --git a/657.patch b/657.patch deleted file mode 100644 index 000e879..0000000 --- a/657.patch +++ /dev/null @@ -1,97 +0,0 @@ -From e59634c0e1f843bc5d67f111f08eddf70496def2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= - <2589111+jfbu@users.noreply.github.com> -Date: Sat, 30 Jul 2022 17:42:51 +0200 -Subject: [PATCH] Fix #656: Sphinx 5.1.0 has modified some internal LaTeX - macros - ---- - src/nbsphinx.py | 47 +++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 45 insertions(+), 2 deletions(-) - -diff --git a/src/nbsphinx.py b/src/nbsphinx.py -index 77e51999..5837da32 100644 ---- a/src/nbsphinx.py -+++ b/src/nbsphinx.py -@@ -299,6 +299,15 @@ - """.replace('__RST_DEFAULT_TEMPLATE__', nbconvert.RSTExporter().template_file) - - -+# MEMO: the nbsphinxfancyoutput environment recycles some internal Sphinx -+# LaTeX macros, as testify the @ in their names. At 5.1.0 these macros -+# got modified so we now have two cases for the nbsphinxfancyoutput -+# definition: Sphinx >= 5.1.0 or Sphinx < 5.1.0 (and >= 1.7.0 at least). -+ -+# MEMO: since Sphinx 2.0 the upstream \sphinxincludegraphics is similar and -+# slightly better than the \nbsphinxincludegraphics defined here. So for the -+# >= 5.1.0 branch of nbsphinxfancyoutput, the code does no replacement of -+# \sphinxincludegraphics by \nbsphinxincludegraphics anymore. - LATEX_PREAMBLE = r""" - % Jupyter Notebook code cell colors - \definecolor{nbsphinxin}{HTML}{307FC1} -@@ -327,7 +336,39 @@ - \definecolor{ansi-default-inverse-bg}{HTML}{000000} - - % Define an environment for non-plain-text code cell outputs (e.g. images) -+\newbox\nbsphinxpromptbox - \makeatletter -+\@ifpackagelater{sphinx}{2022/06/30}{% "later" means here "at least" -+% In this branch Sphinx is at least at 5.1.0 -+\newenvironment{nbsphinxfancyoutput}{% -+\sphinxcolorlet{VerbatimColor}{white}% -+\sphinxcolorlet{VerbatimBorderColor}{nbsphinx-code-border}% -+\spx@verb@boxes@fcolorbox@setup -+ % for \sphinxincludegraphics check of maximal height -+ \spx@image@maxheight \textheight -+ \advance\spx@image@maxheight -\spx@boxes@border@top -+ \advance\spx@image@maxheight -\spx@boxes@padding@top -+ \advance\spx@image@maxheight -\spx@boxes@padding@bottom -+ \advance\spx@image@maxheight -\spx@boxes@border@bottom -+ \advance\spx@image@maxheight -\baselineskip -+\def\sphinxVerbatim@Before{\nbsphinxfancyaddprompt}% -+\def\sphinxVerbatim@After {\@empty}% -+\def\FrameCommand {\sphinxVerbatim@FrameCommand}% -+\def\FirstFrameCommand{\sphinxVerbatim@FirstFrameCommand}% -+\def\MidFrameCommand {\sphinxVerbatim@MidFrameCommand}% -+\def\LastFrameCommand {\sphinxVerbatim@LastFrameCommand}% -+\MakeFramed{\advance\hsize-\width\@totalleftmargin\z@\linewidth\hsize\@setminipage}% -+\lineskip=1ex\lineskiplimit=1ex\raggedright% -+}{\par\unskip\@minipagefalse\endMakeFramed} -+\def\nbsphinxfancyaddprompt{\ifvoid\nbsphinxpromptbox\else -+ \kern\spx@boxes@border@top\kern\spx@boxes@padding@top -+ \copy\nbsphinxpromptbox -+ \kern-\ht\nbsphinxpromptbox\kern-\dp\nbsphinxpromptbox -+ \kern-\spx@boxes@padding@top\kern-\spx@boxes@border@top -+ \nointerlineskip -+ \fi} -+}% End of Sphinx >= 5.1.0 branch -+{% This branch for Sphinx < 5.1.0 - \newenvironment{nbsphinxfancyoutput}{% - % Avoid fatal error with framed.sty if graphics too long to fit on one page - \let\sphinxincludegraphics\nbsphinxincludegraphics -@@ -343,14 +384,14 @@ - \MakeFramed{\advance\hsize-\width\@totalleftmargin\z@\linewidth\hsize\@setminipage}% - \lineskip=1ex\lineskiplimit=1ex\raggedright% - }{\par\unskip\@minipagefalse\endMakeFramed} --\makeatother --\newbox\nbsphinxpromptbox - \def\nbsphinxfancyaddprompt{\ifvoid\nbsphinxpromptbox\else - \kern\fboxrule\kern\fboxsep - \copy\nbsphinxpromptbox - \kern-\ht\nbsphinxpromptbox\kern-\dp\nbsphinxpromptbox - \kern-\fboxsep\kern-\fboxrule\nointerlineskip - \fi} -+}% end of Sphinx < 5.1.0 branch -+\makeatother - \newlength\nbsphinxcodecellspacing - \setlength{\nbsphinxcodecellspacing}{0pt} - -@@ -404,6 +445,8 @@ - }% end of \nbsphinxstopnotebook - - % Ensure height of an included graphics fits in nbsphinxfancyoutput frame -+% The Sphinx >= 5.1.0 version of nbsphinxfancyoutput does not use this macro -+% as \sphinxincludegraphics is since Sphinx 2.0 similar and slightly better. - \newdimen\nbsphinx@image@maxheight % set in nbsphinxfancyoutput environment - \newcommand*{\nbsphinxincludegraphics}[2][]{% - \gdef\spx@includegraphics@options{#1}% diff --git a/allow-errors-in-notebooks-with-external-images.patch b/allow-errors-in-notebooks-with-external-images.patch index 8d6e32a..7eca94a 100644 --- a/allow-errors-in-notebooks-with-external-images.patch +++ b/allow-errors-in-notebooks-with-external-images.patch @@ -5,8 +5,7 @@ Subject: [PATCH] allow-errors-in-notebooks-with-external-images.patch --- doc/code-cells.ipynb | 10 ++++++++++ - doc/gallery/multiple-outputs.ipynb | 3 +++ - 2 files changed, 13 insertions(+) + 1 file changed, 10 insertions(+) diff --git a/doc/code-cells.ipynb b/doc/code-cells.ipynb index 1d550e2..3a0d7dd 100644 @@ -36,20 +35,6 @@ index 1d550e2..3a0d7dd 100644 } }, "nbformat": 4, -diff --git a/doc/gallery/multiple-outputs.ipynb b/doc/gallery/multiple-outputs.ipynb -index 4bbbeb7..4cdb62f 100644 ---- a/doc/gallery/multiple-outputs.ipynb -+++ b/doc/gallery/multiple-outputs.ipynb -@@ -72,6 +72,9 @@ - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.6" -+ }, -+ "nbsphinx": { -+ "allow_errors": true - } - }, - "nbformat": 4, -- 2.37.2 diff --git a/python-nbsphinx.spec b/python-nbsphinx.spec index 8df6c85..67edb89 100644 --- a/python-nbsphinx.spec +++ b/python-nbsphinx.spec @@ -1,6 +1,6 @@ Name: python-nbsphinx -Version: 0.8.9 -Release: 4%{?dist} +Version: 0.9.2 +Release: 1%{?dist} Summary: Jupyter Notebook Tools for Sphinx # SPDX @@ -8,8 +8,6 @@ License: MIT URL: http://nbsphinx.rtfd.io/ Source0: %{pypi_source nbsphinx} Patch0: allow-errors-in-notebooks-with-external-images.patch -# Ensure smooth PDF LaTeX builds with Sphinx 5.1.0+ -Patch1: https://github.com/spatialaudio/nbsphinx/pull/657.patch BuildArch: noarch BuildRequires: python3-devel @@ -70,7 +68,7 @@ git tag %{version} # generate html docs PYTHONPATH=build/lib sphinx-build-3 doc html # remove the sphinx-build leftovers -rm -rf html/{.doctrees,.buildinfo,conf.py} +rm -rf html/{.doctrees,.buildinfo,conf.py,_sources} %install %py3_install @@ -79,7 +77,7 @@ rm -rf html/{.doctrees,.buildinfo,conf.py} %files -n python3-nbsphinx %license LICENSE %doc README.rst -%pycached %{python3_sitelib}/nbsphinx.py +%{python3_sitelib}/nbsphinx %{python3_sitelib}/nbsphinx-%{version}-py%{python3_version}.egg-info/ %files -n python-nbsphinx-doc @@ -87,6 +85,9 @@ rm -rf html/{.doctrees,.buildinfo,conf.py} %doc html %changelog +* Wed Aug 23 2023 Lumír Balhar - 0.9.2-1 +- Update to 0.9.2 (rhbz#2142414) + * Fri Jul 21 2023 Fedora Release Engineering - 0.8.9-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index a7e77c6..f84cbd6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nbsphinx-0.8.9.tar.gz) = 10240ea849929579d2f76a0fdf5045cc9fca7d31c05b3a4073bb7aae67446c7be807a2d1afde60396926499bd42f1a9b514f5594c457eb5070d32126e5340309 +SHA512 (nbsphinx-0.9.2.tar.gz) = b5e371e3177f03e72d87059d0c06cb4787afe255926e9f2440ea0c753f5457974535f42c98bd5bb289752151400612f28de98e1b36e6865b26790e56d1f78b80