|
 |
6523a2c |
# Unset -s on python shebang - ensure that extensions installed with pip
|
|
 |
6523a2c |
# to user locations are seen and properly loaded
|
|
 |
009920b |
%global py3_shebang_flags %(echo %py3_shebang_flags | sed s/s//)
|
|
 |
6523a2c |
|
|
 |
fb7b1e1 |
%global pypi_name nbconvert
|
|
 |
fb7b1e1 |
|
|
 |
fb7b1e1 |
Name: python-%{pypi_name}
|
|
 |
1f3761a |
Version: 6.4.5
|
|
 |
a858a71 |
Release: %autorelease
|
|
 |
fb7b1e1 |
Summary: Converting Jupyter Notebooks
|
|
 |
fb7b1e1 |
|
|
 |
fb7b1e1 |
License: BSD and MIT
|
|
 |
fb7b1e1 |
URL: http://jupyter.org
|
|
 |
2f9143e |
Source0: %pypi_source
|
|
 |
054997d |
|
|
 |
0fe97ea |
|
|
 |
fb7b1e1 |
BuildArch: noarch
|
|
 |
2f9143e |
|
|
 |
c5f6e3c |
BuildRequires: python3-pandocfilters
|
|
 |
82a12ba |
BuildRequires: python3-jupyterlab_pygments
|
|
 |
fb7b1e1 |
BuildRequires: python3-setuptools
|
|
 |
6aadcbe |
BuildRequires: python3-testpath
|
|
 |
fb7b1e1 |
BuildRequires: python3-devel
|
|
 |
fb7b1e1 |
|
|
 |
82c421a |
|
|
 |
67e2ca5 |
%bcond_without doc
|
|
 |
f17cf84 |
%bcond_without check
|
|
 |
82c421a |
|
|
 |
82c421a |
%if %{with doc}
|
|
 |
e695cd7 |
BuildRequires: python3-entrypoints
|
|
 |
6aadcbe |
BuildRequires: python3-ipython
|
|
 |
6aadcbe |
BuildRequires: python3-ipython-sphinx
|
|
 |
e695cd7 |
BuildRequires: python3-nbformat
|
|
 |
e695cd7 |
BuildRequires: python3-nbsphinx
|
|
 |
82c421a |
BuildRequires: python3-sphinx
|
|
 |
e695cd7 |
BuildRequires: python3-sphinx_rtd_theme
|
|
 |
f17cf84 |
BuildRequires: python3-sphinxcontrib-github-alt
|
|
 |
1f3761a |
BuildRequires: python3-beautifulsoup4
|
|
 |
6aadcbe |
BuildRequires: pandoc
|
|
 |
82c421a |
%endif
|
|
 |
6fa94ec |
|
|
 |
f17cf84 |
%if %{with check}
|
|
 |
e695cd7 |
BuildRequires: python3-bleach
|
|
 |
e695cd7 |
BuildRequires: python3-entrypoints
|
|
 |
e695cd7 |
BuildRequires: python3-defusedxml
|
|
 |
f17cf84 |
BuildRequires: python3-ipykernel
|
|
 |
82a12ba |
BuildRequires: python3-ipywidgets
|
|
 |
e695cd7 |
BuildRequires: python3-jinja2
|
|
 |
5993a86 |
BuildRequires: python3-jupyter-core
|
|
 |
e695cd7 |
BuildRequires: python3-mistune
|
|
 |
82a12ba |
BuildRequires: python3-nbclient
|
|
 |
e695cd7 |
BuildRequires: python3-nbformat
|
|
 |
f17cf84 |
BuildRequires: python3-nose
|
|
 |
82a12ba |
BuildRequires: python3-pebble
|
|
 |
f17cf84 |
BuildRequires: python3-pytest
|
|
 |
82a12ba |
BuildRequires: texlive-xetex
|
|
 |
82a12ba |
# Spent far too much time chasing required tex packages
|
|
 |
82a12ba |
# installing everything - tests pass!
|
|
 |
82a12ba |
BuildRequires: texlive-scheme-full
|
|
 |
054997d |
BuildRequires: inkscape
|
|
 |
ae5f8eb |
BuildRequires: pandoc
|
|
 |
f17cf84 |
%endif
|
|
 |
f17cf84 |
|
|
 |
f17cf84 |
|
|
 |
fb7b1e1 |
%description
|
|
 |
fb7b1e1 |
The nbconvert tool, jupyter nbconvert, converts notebooks to various other
|
|
 |
fb7b1e1 |
formats via Jinja templates. The nbconvert tool allows you to convert an
|
|
 |
fb7b1e1 |
.ipynb notebook file into various static formats including HTML, LaTeX,
|
|
 |
fb7b1e1 |
PDF, Reveal JS, Markdown (md), ReStructured Text (rst) and executable script.
|
|
 |
fb7b1e1 |
|
|
 |
fb7b1e1 |
%package -n python3-%{pypi_name}
|
|
 |
fb7b1e1 |
Summary: Converting Jupyter Notebooks
|
|
 |
f17cf84 |
|
|
 |
054997d |
Recommends: inkscape
|
|
 |
ae5f8eb |
Recommends: pandoc
|
|
 |
fb7b1e1 |
|
|
 |
fb7b1e1 |
%description -n python3-%{pypi_name}
|
|
 |
fb7b1e1 |
|
|
 |
fb7b1e1 |
The nbconvert tool, jupyter nbconvert, converts notebooks to various other
|
|
 |
fb7b1e1 |
formats via Jinja templates. The nbconvert tool allows you to convert an
|
|
 |
fb7b1e1 |
.ipynb notebook file into various static formats including HTML, LaTeX,
|
|
 |
fb7b1e1 |
PDF, Reveal JS, Markdown (md), ReStructured Text (rst) and executable script.
|
|
 |
fb7b1e1 |
|
|
 |
fb7b1e1 |
%package -n python-%{pypi_name}-doc
|
|
 |
fb7b1e1 |
Summary: Documentation for nbconvert
|
|
 |
fb7b1e1 |
%description -n python-%{pypi_name}-doc
|
|
 |
fb7b1e1 |
Documentation for nbconvert
|
|
 |
fb7b1e1 |
|
|
 |
fb7b1e1 |
%prep
|
|
 |
054997d |
%autosetup -p1 -n %{pypi_name}-%{version}
|
|
 |
fb7b1e1 |
rm -rf %{pypi_name}.egg-info
|
|
 |
fb7b1e1 |
|
|
 |
82a12ba |
echo "nbsphinx_allow_errors = True" >> docs/source/conf.py
|
|
 |
82a12ba |
|
|
 |
82a12ba |
|
|
 |
fb7b1e1 |
%build
|
|
 |
fb7b1e1 |
%py3_build
|
|
 |
fb7b1e1 |
|
|
 |
82c421a |
%if %{with doc}
|
|
 |
52600a9 |
export PYTHONPATH=$(pwd)
|
|
 |
6fa94ec |
sphinx-build-3 docs/source html
|
|
 |
fb7b1e1 |
rm -rf html/.{doctrees,buildinfo}
|
|
 |
82c421a |
%endif
|
|
 |
fb7b1e1 |
|
|
 |
fb7b1e1 |
%install
|
|
 |
fb7b1e1 |
%py3_install
|
|
 |
fb7b1e1 |
|
|
 |
040b559 |
# fix permissions and shebangs
|
|
 |
f17cf84 |
pathfix.py -pni %{__python3} %{buildroot}%{python3_sitelib}/%{pypi_name}/nbconvertapp.py
|
|
 |
fb7b1e1 |
chmod 755 %{buildroot}%{python3_sitelib}/%{pypi_name}/nbconvertapp.py
|
|
 |
fb7b1e1 |
|
|
 |
f17cf84 |
%if %{with check}
|
|
 |
f17cf84 |
%check
|
|
 |
82a12ba |
|
|
 |
82a12ba |
# test_webpdf needs pyppeteer
|
|
 |
82a12ba |
# rest of the disabled tests fail for reasons that I do not understand
|
|
 |
1f3761a |
%{__python3} -m pytest -v -k "not test_webpdf_without_chromium and not test_pdf and not test_webpdf_with_chromium and not test_webpdf and not test_embedding_images_htmlexporter"
|
|
 |
82a12ba |
|
|
 |
f17cf84 |
%endif
|
|
 |
f17cf84 |
|
|
 |
fb7b1e1 |
%files -n python3-%{pypi_name}
|
|
 |
44220db |
%license LICENSE
|
|
 |
fb7b1e1 |
%doc docs/README.md
|
|
 |
be2a201 |
%{_bindir}/jupyter-nbconvert
|
|
 |
f8e3fe2 |
%{_bindir}/jupyter-dejavu
|
|
 |
fd1b3b1 |
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
|
|
 |
a1e34c3 |
%{python3_sitelib}/%{pypi_name}/
|
|
 |
82a12ba |
%{_datadir}/jupyter/%{pypi_name}/templates/
|
|
 |
fb7b1e1 |
|
|
 |
82c421a |
%if %{with doc}
|
|
 |
fb7b1e1 |
%files -n python-%{pypi_name}-doc
|
|
 |
6fa94ec |
%doc html
|
|
 |
82c421a |
%endif
|
|
 |
fb7b1e1 |
|
|
 |
fb7b1e1 |
%changelog
|
|
 |
a858a71 |
%autochangelog
|