diff --git a/0001-fix-mistune-version-to-adapt-python-m2r.patch b/0001-fix-mistune-version-to-adapt-python-m2r.patch new file mode 100644 index 0000000..7ba70e4 --- /dev/null +++ b/0001-fix-mistune-version-to-adapt-python-m2r.patch @@ -0,0 +1,25 @@ +From 70acaea410b1efe64af246a84f2e2bfacb8964ae Mon Sep 17 00:00:00 2001 +From: li-miaomiao_zhr +Date: Fri, 14 Jul 2023 10:16:45 +0800 +Subject: [PATCH] fix mistune version to adapt python-m2r + +--- + pyproject.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyproject.toml b/pyproject.toml +index f5085c3..1e11c5f 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -28,7 +28,7 @@ dependencies = [ + "jupyter_core>=4.7", + "jupyterlab_pygments", + "MarkupSafe>=2.0", +- "mistune>=2.0.3,<4", ++ "mistune>=0.8.3,<4", + "nbclient>=0.5.0", + "nbformat>=5.7", + "packaging", +-- +2.39.1 + diff --git a/nbconvert-7.6.0.tar.gz b/nbconvert-7.6.0.tar.gz new file mode 100644 index 0000000..c7df355 Binary files /dev/null and b/nbconvert-7.6.0.tar.gz differ diff --git a/python-nbconvert.spec b/python-nbconvert.spec new file mode 100644 index 0000000..b9dd0ef --- /dev/null +++ b/python-nbconvert.spec @@ -0,0 +1,74 @@ +%global _empty_manifest_terminate_build 0 +%global pypi_name nbconvert + +Name: python-%{pypi_name} +Version: 7.6.0 +Release: 1 +Summary: Converting Jupyter Notebooks + +License: BSD-3-Clause +URL: https://pypi.org/project/nbconvert/ +Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch +Patch: 0001-fix-mistune-version-to-adapt-python-m2r.patch + +# Base Requires +BuildRequires: python3-devel +BuildRequires: python3-wheel +BuildRequires: python3-pip +BuildRequires: python3-hatchling +BuildRequires: python3-beautifulsoup4 +BuildRequires: python3-defusedxml +BuildRequires: python3-importlib-metadata +BuildRequires: python3-jinja2 +BuildRequires: python3-markupsafe +BuildRequires: python3-packaging +BuildRequires: python3-pandocfilters +BuildRequires: python3-traitlets +BuildRequires: python3-mistune + +%description +The nbconvert tool, jupyter nbconvert, converts notebooks to various other +formats via Jinja templates. The nbconvert tool allows you to convert an +.ipynb notebook file into various static formats including HTML, LaTeX, +PDF, Reveal JS, Markdown (md), ReStructured Text (rst) and executable script. + +%package -n python3-%{pypi_name} +Summary: Converting Jupyter Notebooks + +%description -n python3-%{pypi_name} +The nbconvert tool, jupyter nbconvert, converts notebooks to various other +formats via Jinja templates. The nbconvert tool allows you to convert an +.ipynb notebook file into various static formats including HTML, LaTeX, +PDF, Reveal JS, Markdown (md), ReStructured Text (rst) and executable script. + +%package -n python-%{pypi_name}-doc +Summary: Documentation for nbconvert +%description -n python-%{pypi_name}-doc +Documentation for nbconvert + +%prep +%autosetup -p1 -n %{pypi_name}-%{version} +rm -rf %{pypi_name}.egg-info +echo "nbsphinx_allow_errors = True" >> docs/source/conf.py +# Remove coverage testing +sed -i '/"pytest-cov",/d' pyproject.toml + +%build +%pyproject_build + +%install +%pyproject_install + +%files -n python3-%{pypi_name} +%doc README.md +%license LICENSE +%{_bindir}/jupyter-dejavu +%{_bindir}/jupyter-nbconvert +%{python3_sitelib}/nbconvert-*.dist-info/ +%{python3_sitelib}/nbconvert/ +%{_datadir}/jupyter/%{pypi_name}/templates/ + +%changelog +* Thu Jul 13 2023 li-miaomiao_zhr - 7.6.0-1 +- Package init