Accepting request 980880 from devel:languages:python:jupyter
OBS-URL: https://build.opensuse.org/request/show/980880 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nbconvert?expand=0&rev=13
This commit is contained in:
commit
d4fdc76c7c
11
ignore-bleach-deprecation-test.patch
Normal file
11
ignore-bleach-deprecation-test.patch
Normal file
@ -0,0 +1,11 @@
|
||||
Index: nbconvert-6.5.0/pyproject.toml
|
||||
===================================================================
|
||||
--- nbconvert-6.5.0.orig/pyproject.toml
|
||||
+++ nbconvert-6.5.0/pyproject.toml
|
||||
@@ -21,5 +21,5 @@ filterwarnings = [
|
||||
"ignore:unclosed <socket.socket:ResourceWarning",
|
||||
"ignore:unclosed event loop:ResourceWarning",
|
||||
"ignore:There is no current event loop:DeprecationWarning",
|
||||
-
|
||||
+ "ignore:Support for bleach <5 will be removed in a future version of nbconvert:DeprecationWarning",
|
||||
]
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ee0dfe34bbd1082ac9bfc750aae3c73fcbc34a70c5574c6986ff83c10a3541fd
|
||||
size 906988
|
3
nbconvert-6.5.0.tar.gz
Normal file
3
nbconvert-6.5.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:223e46e27abe8596b8aed54301fadbba433b7ffea8196a68fd7b1ff509eee99d
|
||||
size 908377
|
@ -1,25 +1,41 @@
|
||||
Index: nbconvert-6.3.0/nbconvert/filters/markdown_mistune.py
|
||||
Index: nbconvert-6.5.0/nbconvert/filters/markdown_mistune.py
|
||||
===================================================================
|
||||
--- nbconvert-6.3.0.orig/nbconvert/filters/markdown_mistune.py
|
||||
+++ nbconvert-6.3.0/nbconvert/filters/markdown_mistune.py
|
||||
@@ -23,7 +23,7 @@ except ImportError:
|
||||
--- nbconvert-6.5.0.orig/nbconvert/filters/markdown_mistune.py
|
||||
+++ nbconvert-6.5.0/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.3.0/setup.py
|
||||
Index: nbconvert-6.5.0/setup.py
|
||||
===================================================================
|
||||
--- nbconvert-6.3.0.orig/setup.py
|
||||
+++ nbconvert-6.3.0/setup.py
|
||||
@@ -214,7 +214,6 @@ setup_args = dict(
|
||||
)
|
||||
--- nbconvert-6.5.0.orig/setup.py
|
||||
+++ nbconvert-6.5.0/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
|
||||
|
||||
setup_args['install_requires'] = [
|
||||
- 'mistune>=0.8.1,<2',
|
||||
'jinja2>=2.4',
|
||||
'pygments>=2.4.1',
|
||||
'jupyterlab_pygments',
|
||||
|
@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 5 11:29:55 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 6.5.0
|
||||
* Drop dependency on testpath. by @anntzer in #1723
|
||||
* Apply Autoformatters by @blink1073 in #1746
|
||||
* support bleach 5, add packaging and tinycss2 dependencies by
|
||||
@bollwyvl in #1755
|
||||
* update cli example by @leahecole in #1753
|
||||
- Refresh nbconvert-vendorize-mistune.patch, include
|
||||
gh#lepture/mistune#188 for successful import
|
||||
- Add ignore-bleach-deprecation-test.patch because the test suite
|
||||
fails with a DeprecationWarning for bleach <5 otherwise.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 12 04:50:52 UTC 2022 - Arun Persaud <arun@gmx.de>
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
%{?!python_module:%define python_module() python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-nbconvert%{psuffix}
|
||||
Version: 6.4.4
|
||||
Version: 6.5.0
|
||||
Release: 0
|
||||
Summary: Conversion of Jupyter Notebooks
|
||||
License: BSD-3-Clause
|
||||
@ -42,28 +42,33 @@ Source0: https://files.pythonhosted.org/packages/source/n/nbconvert/nbcon
|
||||
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
|
||||
# PATCH-FIX-OPENSUSE ignore-bleach-deprecation-test.patch -- ignore warning that we don't have bleach5 yet
|
||||
Patch2: ignore-bleach-deprecation-test.patch
|
||||
BuildRequires: %{python_module base >= 3.7}
|
||||
BuildRequires: %{python_module beautifulsoup4}
|
||||
BuildRequires: %{python_module packaging}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: unzip
|
||||
Requires: jupyter-nbconvert = %{version}
|
||||
Requires: python-Jinja2 >= 2.4
|
||||
Requires: python-Jinja2 >= 3.0
|
||||
Requires: python-MarkupSafe >= 2.0
|
||||
Requires: python-Pygments >= 2.4.1
|
||||
Requires: python-beautifulsoup4
|
||||
Requires: python-bleach
|
||||
Requires: python-defusedxml
|
||||
Requires: python-entrypoints >= 0.2.2
|
||||
Requires: python-jupyter-core
|
||||
Requires: python-jupyter-core >= 4.7
|
||||
Requires: python-jupyterlab-pygments
|
||||
Requires: python-nbclient >= 0.5
|
||||
Requires: python-nbformat >= 4.4
|
||||
Requires: python-nbformat >= 5.1
|
||||
Requires: python-packaging
|
||||
Requires: python-pandocfilters >= 1.4.1
|
||||
Requires: python-testpath
|
||||
Requires: python-tinycss2
|
||||
Requires: python-traitlets >= 5.0
|
||||
Recommends: pandoc
|
||||
Recommends: python-tornado >= 4.0
|
||||
Recommends: python-tornado >= 6.1
|
||||
Suggests: %{name}-latex
|
||||
Provides: python-jupyter_nbconvert = %{version}
|
||||
Obsoletes: python-jupyter_nbconvert < %{version}
|
||||
@ -122,16 +127,15 @@ via Jinja templates.
|
||||
This package pulls in the LaTeX dependencies for nbconvert.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n nbconvert-%{version} -b3
|
||||
%setup -q -n nbconvert-%{version} -b3
|
||||
|
||||
mkdir nbconvert/vendor
|
||||
touch nbconvert/vendor/__init__.py
|
||||
cp ../mistune-0.8.4/mistune.py nbconvert/vendor/
|
||||
%patch1 -p1
|
||||
sed -i -e '/^#!\//, 1d' nbconvert/nbconvertapp.py
|
||||
sed -i -e '/^#!\//, 1d' nbconvert/filters/filter_links.py
|
||||
|
||||
# Ignore maxversion requirements
|
||||
sed -i -e "/nbclient/ s/,<.*'/'/" setup.py
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@ -149,14 +153,12 @@ sed -i -e "/nbclient/ s/,<.*'/'/" setup.py
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
pushd docs
|
||||
export LANG=en_US.UTF-8
|
||||
%{python_expand # installed package in :test flavor
|
||||
$python -B -m ipykernel.kernelspec --user
|
||||
# not test_webpdf: no pyppeteer, not even offline
|
||||
pytest-%{$python_bin_suffix} -v -m 'not network' -k "not test_webpdf" --pyargs nbconvert
|
||||
}
|
||||
popd
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
|
Loading…
Reference in New Issue
Block a user