forked from pool/python-nbconvert
Accepting request 943334 from home:bnavigator:branches:devel:languages:python:jupyter:notraitlets5
- Revert to 6.0.7 * We can't have a newer version without traitlets 5. But we can't have traitlets 5 as long as python36 is active - Vendorize mistune 0.8.4 * Add nbconvert-vendorize-mistune.patch * gh#jupyter/nbconvert#1685 - Alternativize flavored entry-point. For 6.3: do it with dejavu OBS-URL: https://build.opensuse.org/request/show/943334 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbconvert?expand=0&rev=29
This commit is contained in:
parent
b0073e5a99
commit
9059646b58
3
mistune-0.8.4.tar.gz
Normal file
3
mistune-0.8.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e
|
||||||
|
size 58322
|
3
nbconvert-6.0.7.tar.gz
Normal file
3
nbconvert-6.0.7.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cbbc13a86dfbd4d1b5dee106539de0795b4db156c894c2c5dc382062bbc29002
|
||||||
|
size 896833
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:5e77d6203854944520105e38f2563a813a4a3708e8563aa598928a3b5ee1081a
|
|
||||||
size 900850
|
|
25
nbconvert-vendorize-mistune.patch
Normal file
25
nbconvert-vendorize-mistune.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
Index: nbconvert-6.0.7/nbconvert/filters/markdown_mistune.py
|
||||||
|
===================================================================
|
||||||
|
--- nbconvert-6.0.7.orig/nbconvert/filters/markdown_mistune.py
|
||||||
|
+++ nbconvert-6.0.7/nbconvert/filters/markdown_mistune.py
|
||||||
|
@@ -18,7 +18,7 @@ except ImportError:
|
||||||
|
# Python 2
|
||||||
|
from cgi import escape as html_escape
|
||||||
|
|
||||||
|
-import mistune
|
||||||
|
+from nbconvert.vendor import mistune
|
||||||
|
|
||||||
|
from pygments import highlight
|
||||||
|
from pygments.lexers import get_lexer_by_name
|
||||||
|
Index: nbconvert-6.0.7/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- nbconvert-6.0.7.orig/setup.py
|
||||||
|
+++ nbconvert-6.0.7/setup.py
|
||||||
|
@@ -212,7 +212,6 @@ setup_args = dict(
|
||||||
|
)
|
||||||
|
|
||||||
|
setup_args['install_requires'] = [
|
||||||
|
- 'mistune>=0.8.1,<2',
|
||||||
|
'jinja2>=2.4',
|
||||||
|
'pygments>=2.4.1',
|
||||||
|
'jupyterlab_pygments',
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:416d49e6d1dc1caf39bb8602e705ee3cae46fde88be0bd5686b26e3b8d9f59c6
|
oid sha256:720196ba36473e3fa6bcbb79b1463640730e0e007acb07aba73cfd9adacae0de
|
||||||
size 643265
|
size 548761
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:8e880a151f358d2ce4e9a8a6d234043e108ad38288d12dba4e54e4c6e7e5fd2a
|
oid sha256:fbc32a1803eabb59acee50b81e705fe11c285ff42b7a99e7d4c68b3bc0bd1507
|
||||||
size 4707510
|
size 8652426
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 31 16:28:25 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Revert to 6.0.7
|
||||||
|
* We can't have a newer version without traitlets 5. But we
|
||||||
|
can't have traitlets 5 as long as python36 is active
|
||||||
|
- Vendorize mistune 0.8.4
|
||||||
|
* Add nbconvert-vendorize-mistune.patch
|
||||||
|
* gh#jupyter/nbconvert#1685
|
||||||
|
- Alternativize flavored entry-point. For 6.3: do it with dejavu
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 30 18:01:32 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
Thu Dec 30 18:01:32 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package python-nbconvert
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2021 SUSE LLC
|
||||||
#
|
#
|
||||||
@ -28,9 +28,9 @@
|
|||||||
# Note: only update to > 6.0 when there is no python36 Jupyter stack anymore
|
# Note: only update to > 6.0 when there is no python36 Jupyter stack anymore
|
||||||
%{?!python_module:%define python_module() python3-%{**}}
|
%{?!python_module:%define python_module() python3-%{**}}
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
%define doc_ver 6.3.0
|
%define doc_ver 6.0.7
|
||||||
Name: python-nbconvert%{psuffix}
|
Name: python-nbconvert%{psuffix}
|
||||||
Version: 6.3.0
|
Version: 6.0.7
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Conversion of Jupyter Notebooks
|
Summary: Conversion of Jupyter Notebooks
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
@ -38,6 +38,10 @@ 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
|
||||||
Source1: https://media.readthedocs.org/pdf/nbconvert/%{doc_ver}/nbconvert.pdf
|
Source1: https://media.readthedocs.org/pdf/nbconvert/%{doc_ver}/nbconvert.pdf
|
||||||
Source2: https://media.readthedocs.org/htmlzip/nbconvert/%{doc_ver}/nbconvert.zip
|
Source2: https://media.readthedocs.org/htmlzip/nbconvert/%{doc_ver}/nbconvert.zip
|
||||||
|
# License Source3: BSD-3-Clause
|
||||||
|
Source3: https://files.pythonhosted.org/packages/source/m/mistune/mistune-0.8.4.tar.gz
|
||||||
|
# PATCH-FIX-OPENSUSE nbconvert-vendorize-mistune.patch -- gh#jupyter/nbconvert#1685
|
||||||
|
Patch1: nbconvert-vendorize-mistune.patch
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@ -57,6 +61,13 @@ Requires: python-nbformat >= 4.4
|
|||||||
Requires: python-pandocfilters >= 1.4.1
|
Requires: python-pandocfilters >= 1.4.1
|
||||||
Requires: python-testpath
|
Requires: python-testpath
|
||||||
Requires: python-traitlets >= 4.2
|
Requires: python-traitlets >= 4.2
|
||||||
|
%if %{with libalternatives}
|
||||||
|
Requires: alts
|
||||||
|
BuildRequires: alts
|
||||||
|
%else
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun):update-alternatives
|
||||||
|
%endif
|
||||||
Recommends: pandoc
|
Recommends: pandoc
|
||||||
Recommends: python-tornado >= 4.0
|
Recommends: python-tornado >= 4.0
|
||||||
Suggests: %{name}-latex
|
Suggests: %{name}-latex
|
||||||
@ -137,9 +148,12 @@ Obsoletes: %{python_module jupyter_nbconvert-doc < %{version}}
|
|||||||
Documentation and help files for Jupyter's notebook converter.
|
Documentation and help files for Jupyter's notebook converter.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n nbconvert-%{version}
|
%autosetup -p1 -n nbconvert-%{version} -b3
|
||||||
|
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
|
mkdir nbconvert/vendor
|
||||||
|
touch nbconvert/vendor/__init__.py
|
||||||
|
cp ../mistune-0.8.4/mistune.py nbconvert/vendor/
|
||||||
unzip %{SOURCE2} -d docs
|
unzip %{SOURCE2} -d docs
|
||||||
mv docs/nbconvert-* docs/html
|
mv docs/nbconvert-* docs/html
|
||||||
rm docs/html/.buildinfo
|
rm docs/html/.buildinfo
|
||||||
@ -156,6 +170,8 @@ sed -i -e "/nbclient/ s/,<.*'/'/" setup.py
|
|||||||
%if ! %{with test}
|
%if ! %{with test}
|
||||||
%python_install
|
%python_install
|
||||||
|
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/jupyter-nbconvert
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_docdir}/jupyter-nbconvert
|
mkdir -p %{buildroot}%{_docdir}/jupyter-nbconvert
|
||||||
|
|
||||||
cp %{SOURCE1} %{buildroot}%{_docdir}/jupyter-nbconvert/
|
cp %{SOURCE1} %{buildroot}%{_docdir}/jupyter-nbconvert/
|
||||||
@ -171,22 +187,31 @@ pushd docs
|
|||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
%{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
|
||||||
pytest-%{$python_bin_suffix} -v -k 'not test_webpdf' --pyargs nbconvert
|
# not test_webpdf: no pyppeteer, not even offline
|
||||||
|
pytest-%{$python_bin_suffix} -v -m 'not network' -k "not test_webpdf" --pyargs nbconvert
|
||||||
}
|
}
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if ! %{with test}
|
%if !%{with test}
|
||||||
|
%pre
|
||||||
|
%python_libalternatives_reset_alternative jupyter-nbconvert
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative jupyter-nbconvert
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative jupyter-nbconvert
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{python_sitelib}/nbconvert-%{version}-py*.egg-info
|
%{python_sitelib}/nbconvert-%{version}-py*.egg-info
|
||||||
%{python_sitelib}/nbconvert/
|
%{python_sitelib}/nbconvert/
|
||||||
|
%python_alternative %{_bindir}/jupyter-nbconvert
|
||||||
|
|
||||||
%files -n jupyter-nbconvert
|
%files -n jupyter-nbconvert
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_bindir}/jupyter-nbconvert
|
|
||||||
%{_bindir}/jupyter-dejavu
|
|
||||||
%dir %{_datadir}/jupyter/
|
%dir %{_datadir}/jupyter/
|
||||||
%dir %{_datadir}/jupyter/nbconvert
|
%dir %{_datadir}/jupyter/nbconvert
|
||||||
%{_datadir}/jupyter/nbconvert/templates
|
%{_datadir}/jupyter/nbconvert/templates
|
||||||
|
Loading…
x
Reference in New Issue
Block a user