forked from pool/python-nbconvert
Accepting request 1005929 from devel:languages:python:jupyter
- Update to version 7.0.0 * Update to Mistune 2.0.2 by @TiagodePAlves in #1764 * Clean up markdown parsing by @blink1073 in #1774 * Switch to hatch build backend by @blink1073 in #1777 * switch from entrypoints to importlib-metadata by @konstin in #1782 * Add recursive flag for glob notebook search by @paoloalba in #1785 * Updates for sphinx 5.0 support by @blink1073 in #1788 * Fixed unique div ids in lab template, fixed #1759 by @veghdev in #1761 * WebPDFExporter: Emulate media print by @martinRenou in #1791 * Fix fonts overriden by user stylesheet by inheriting styles by @dakoop in #1793 * Fix lab template output alignment by @dakoop in #1795 * Add qtpdf and qtpng exporters by @davidbrochart in #1611 * Fix linters by @martinRenou in #1825 * Remove downloaded CSS from repository by @martinRenou in #1827 * escape_html: prevent escaping quotes on widgets JSON reprs (#1829) by @martinRenou in #1830 * Remove tests from bdist by @TiagodePAlves in #1822 * Encode SVG image data as UTF-8 before calling lxml cleaner (fixes #1836) by @emarsden in #1837 * Handle nbformat 5.5 by @blink1073 in #1841 - Drop nbconvert-vendorize-mistune.patch and mistune 0.8.4 sources. OBS-URL: https://build.opensuse.org/request/show/1005929 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nbconvert?expand=0&rev=15
This commit is contained in:
commit
474a7ae31f
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e
|
|
||||||
size 58322
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:10ed693c4cfd3c63583c87ca5c3a2f6ed874145103595f3824efcc8dfcb7522c
|
|
||||||
size 910597
|
|
3
nbconvert-7.0.0.tar.gz
Normal file
3
nbconvert-7.0.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:fd1e361da30e30e4c5a5ae89f7cae95ca2a4d4407389672473312249a7ba0060
|
||||||
|
size 860724
|
@ -1,41 +0,0 @@
|
|||||||
Index: nbconvert-6.5.3/nbconvert/filters/markdown_mistune.py
|
|
||||||
===================================================================
|
|
||||||
--- nbconvert-6.5.3.orig/nbconvert/filters/markdown_mistune.py
|
|
||||||
+++ nbconvert-6.5.3/nbconvert/filters/markdown_mistune.py
|
|
||||||
@@ -21,7 +21,9 @@ except ImportError:
|
|
||||||
from cgi import escape as html_escape
|
|
||||||
|
|
||||||
import bs4
|
|
||||||
-import mistune
|
|
||||||
+
|
|
||||||
+from nbconvert.vendor import mistune
|
|
||||||
+
|
|
||||||
from pygments import highlight
|
|
||||||
from pygments.formatters import HtmlFormatter
|
|
||||||
from pygments.lexers import get_lexer_by_name
|
|
||||||
Index: nbconvert-6.5.3/setup.py
|
|
||||||
===================================================================
|
|
||||||
--- nbconvert-6.5.3.orig/setup.py
|
|
||||||
+++ nbconvert-6.5.3/setup.py
|
|
||||||
@@ -245,7 +245,6 @@ setup_args["install_requires"] = [
|
|
||||||
"jupyter_core>=4.7",
|
|
||||||
"jupyterlab_pygments",
|
|
||||||
"MarkupSafe>=2.0",
|
|
||||||
- "mistune>=0.8.1,<2",
|
|
||||||
"nbclient>=0.5.0",
|
|
||||||
"nbformat>=5.1",
|
|
||||||
"packaging",
|
|
||||||
Index: nbconvert-6.5.0/nbconvert/vendor/mistune.py
|
|
||||||
===================================================================
|
|
||||||
--- nbconvert-6.5.0.orig/nbconvert/vendor/mistune.py
|
|
||||||
+++ nbconvert-6.5.0/nbconvert/vendor/mistune.py
|
|
||||||
@@ -432,7 +432,8 @@ class BlockLexer(object):
|
|
||||||
for i, line in enumerate(cells):
|
|
||||||
for c, cell in enumerate(line):
|
|
||||||
# de-escape any pipe inside the cell here
|
|
||||||
- cells[i][c] = re.sub('\\\\\|', '|', cell)
|
|
||||||
+ # https://github.com/lepture/mistune/pull/188
|
|
||||||
+ cells[i][c] = re.sub(r'\\\|', '|', cell)
|
|
||||||
|
|
||||||
return cells
|
|
||||||
|
|
@ -1,3 +1,32 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 25 23:02:48 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to version 7.0.0
|
||||||
|
* Update to Mistune 2.0.2 by @TiagodePAlves in #1764
|
||||||
|
* Clean up markdown parsing by @blink1073 in #1774
|
||||||
|
* Switch to hatch build backend by @blink1073 in #1777
|
||||||
|
* switch from entrypoints to importlib-metadata by @konstin in
|
||||||
|
#1782
|
||||||
|
* Add recursive flag for glob notebook search by @paoloalba in
|
||||||
|
#1785
|
||||||
|
* Updates for sphinx 5.0 support by @blink1073 in #1788
|
||||||
|
* Fixed unique div ids in lab template, fixed #1759 by @veghdev
|
||||||
|
in #1761
|
||||||
|
* WebPDFExporter: Emulate media print by @martinRenou in #1791
|
||||||
|
* Fix fonts overriden by user stylesheet by inheriting styles by
|
||||||
|
@dakoop in #1793
|
||||||
|
* Fix lab template output alignment by @dakoop in #1795
|
||||||
|
* Add qtpdf and qtpng exporters by @davidbrochart in #1611
|
||||||
|
* Fix linters by @martinRenou in #1825
|
||||||
|
* Remove downloaded CSS from repository by @martinRenou in #1827
|
||||||
|
* escape_html: prevent escaping quotes on widgets JSON reprs
|
||||||
|
(#1829) by @martinRenou in #1830
|
||||||
|
* Remove tests from bdist by @TiagodePAlves in #1822
|
||||||
|
* Encode SVG image data as UTF-8 before calling lxml cleaner
|
||||||
|
(fixes #1836) by @emarsden in #1837
|
||||||
|
* Handle nbformat 5.5 by @blink1073 in #1841
|
||||||
|
- Drop nbconvert-vendorize-mistune.patch and mistune 0.8.4 sources.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 11 14:01:34 UTC 2022 - Arun Persaud <arun@gmx.de>
|
Thu Aug 11 14:01:34 UTC 2022 - Arun Persaud <arun@gmx.de>
|
||||||
|
|
||||||
|
@ -29,25 +29,22 @@
|
|||||||
%else
|
%else
|
||||||
%bcond_with libalternatives
|
%bcond_with libalternatives
|
||||||
%endif
|
%endif
|
||||||
%{?!python_module:%define python_module() python3-%{**}}
|
|
||||||
Name: python-nbconvert%{psuffix}
|
Name: python-nbconvert%{psuffix}
|
||||||
Version: 6.5.3
|
Version: 7.0.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Conversion of Jupyter Notebooks
|
Summary: Conversion of Jupyter Notebooks
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause AND MIT
|
||||||
URL: https://github.com/jupyter/nbconvert
|
URL: https://github.com/jupyter/nbconvert
|
||||||
Source0: https://files.pythonhosted.org/packages/source/n/nbconvert/nbconvert-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/n/nbconvert/nbconvert-%{version}.tar.gz
|
||||||
# License Source3: BSD-3-Clause
|
# See hatch_build.py
|
||||||
Source3: https://files.pythonhosted.org/packages/source/m/mistune/mistune-0.8.4.tar.gz
|
# License10: MIT
|
||||||
# PATCH-FIX-OPENSUSE nbconvert-vendorize-mistune.patch -- gh#jupyter/nbconvert#1685
|
Source10: https://cdn.jupyter.org/notebook/5.4.0/style/style.min.css
|
||||||
Patch1: nbconvert-vendorize-mistune.patch
|
|
||||||
# PATCH-FIX-OPENSUSE ignore-bleach-deprecation-test.patch -- ignore warning that we don't have bleach5 yet
|
# PATCH-FIX-OPENSUSE ignore-bleach-deprecation-test.patch -- ignore warning that we don't have bleach5 yet
|
||||||
Patch2: ignore-bleach-deprecation-test.patch
|
Patch0: ignore-bleach-deprecation-test.patch
|
||||||
BuildRequires: %{python_module base >= 3.7}
|
BuildRequires: %{python_module base >= 3.7}
|
||||||
BuildRequires: %{python_module beautifulsoup4}
|
BuildRequires: %{python_module hatchling >= 0.25}
|
||||||
BuildRequires: %{python_module lxml}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module packaging}
|
|
||||||
BuildRequires: %{python_module setuptools}
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
@ -58,7 +55,6 @@ Requires: python-Pygments >= 2.4.1
|
|||||||
Requires: python-beautifulsoup4
|
Requires: python-beautifulsoup4
|
||||||
Requires: python-bleach
|
Requires: python-bleach
|
||||||
Requires: python-defusedxml
|
Requires: python-defusedxml
|
||||||
Requires: python-entrypoints >= 0.2.2
|
|
||||||
Requires: python-jupyter-core >= 4.7
|
Requires: python-jupyter-core >= 4.7
|
||||||
Requires: python-jupyterlab-pygments
|
Requires: python-jupyterlab-pygments
|
||||||
Requires: python-lxml
|
Requires: python-lxml
|
||||||
@ -68,9 +64,14 @@ Requires: python-packaging
|
|||||||
Requires: python-pandocfilters >= 1.4.1
|
Requires: python-pandocfilters >= 1.4.1
|
||||||
Requires: python-tinycss2
|
Requires: python-tinycss2
|
||||||
Requires: python-traitlets >= 5.0
|
Requires: python-traitlets >= 5.0
|
||||||
|
Requires: (python-mistune >= 2.0.3 with python-mistune < 3)
|
||||||
|
%if 0%{python_version_nodots} < 310
|
||||||
|
Requires: python-importlib-metadata >= 3.6
|
||||||
|
%endif
|
||||||
Recommends: pandoc
|
Recommends: pandoc
|
||||||
Recommends: python-tornado >= 6.1
|
Recommends: python-tornado >= 6.1
|
||||||
Suggests: %{name}-latex
|
Suggests: %{name}-latex
|
||||||
|
Suggests: python-qtwebengine-qt5 >= 5.15
|
||||||
Provides: python-jupyter_nbconvert = %{version}
|
Provides: python-jupyter_nbconvert = %{version}
|
||||||
Obsoletes: python-jupyter_nbconvert < %{version}
|
Obsoletes: python-jupyter_nbconvert < %{version}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -128,26 +129,25 @@ via Jinja templates.
|
|||||||
This package pulls in the LaTeX dependencies for nbconvert.
|
This package pulls in the LaTeX dependencies for nbconvert.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n nbconvert-%{version} -b3
|
%autosetup -p1 -n nbconvert-%{version}
|
||||||
|
for f in nbconvert/nbconvertapp.py nbconvert/filters/filter_links.py; do
|
||||||
mkdir nbconvert/vendor
|
sed -i -e '/^#!\//, 1d' $f
|
||||||
touch nbconvert/vendor/__init__.py
|
chmod -x $f
|
||||||
cp ../mistune-0.8.4/mistune.py nbconvert/vendor/
|
done
|
||||||
%patch1 -p1
|
mkdir share/templates/classic/static
|
||||||
sed -i -e '/^#!\//, 1d' nbconvert/nbconvertapp.py
|
cp %{SOURCE10} share/templates/classic/static/style.css
|
||||||
sed -i -e '/^#!\//, 1d' nbconvert/filters/filter_links.py
|
sed -i '/addopts/ s/--color=yes//' pyproject.toml
|
||||||
%patch2 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%if ! %{with test}
|
||||||
|
%pyproject_wheel
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if ! %{with test}
|
%if ! %{with test}
|
||||||
%python_install
|
%pyproject_install
|
||||||
|
|
||||||
%python_clone -a %{buildroot}%{_bindir}/jupyter-nbconvert
|
%python_clone -a %{buildroot}%{_bindir}/jupyter-nbconvert
|
||||||
%python_clone -a %{buildroot}%{_bindir}/jupyter-dejavu
|
%python_clone -a %{buildroot}%{_bindir}/jupyter-dejavu
|
||||||
|
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%fdupes %{buildroot}%{_docdir}/jupyter-nbconvert/
|
%fdupes %{buildroot}%{_docdir}/jupyter-nbconvert/
|
||||||
%endif
|
%endif
|
||||||
@ -155,10 +155,15 @@ sed -i -e '/^#!\//, 1d' nbconvert/filters/filter_links.py
|
|||||||
%if %{with test}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
|
# not test_webpdf: no pyppeteer, not even offline
|
||||||
|
donttest="test_webpdf"
|
||||||
|
# requires modules not installed: https://github.com/jupyter/nbconvert/issues/1846
|
||||||
|
donttest="$donttest or test_convert_full_qualified_name or test_post_processor"
|
||||||
|
# nbformat error
|
||||||
|
donttest="$donttest or test_empty_code_cell"
|
||||||
%{python_expand # installed package in :test flavor
|
%{python_expand # installed package in :test flavor
|
||||||
$python -B -m ipykernel.kernelspec --user
|
$python -B -m ipykernel.kernelspec --user
|
||||||
# not test_webpdf: no pyppeteer, not even offline
|
pytest-%{$python_bin_suffix} -v -m 'not network' -k "not ($donttest)" --pyargs nbconvert
|
||||||
pytest-%{$python_bin_suffix} -v -m 'not network' -k "not test_webpdf" --pyargs nbconvert
|
|
||||||
}
|
}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
12935
style.min.css
vendored
Normal file
12935
style.min.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user