6523a2c
# Unset -s on python shebang - ensure that extensions installed with pip
6523a2c
# to user locations are seen and properly loaded
6523a2c
%global py3_shebang_flags %nil
6523a2c
fb7b1e1
%global pypi_name nbconvert
fb7b1e1
fb7b1e1
Name:           python-%{pypi_name}
f8e3fe2
Version:        6.4.0
7112fd4
Release:        3%{?dist}
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
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
f8e3fe2
%{__python3} -m pytest -v -k "not test_webpdf_without_chromium and not test_pdf and not test_webpdf_with_chromium and not test_webpdf"
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
7112fd4
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.4.0-3
7112fd4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
7112fd4
7499f03
* Wed Jan 12 2022 Miro Hrončok <mhroncok@redhat.com> - 6.4.0-2
7499f03
- Drop outdated unused BuildRequires of python3-mock
7499f03
f8e3fe2
* Sat Jan 08 2022 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 6.4.0-1
f8e3fe2
- Update to 6.4.0
f8e3fe2
8e777d6
* Wed Dec 15 2021 Miro Hrončok <mhroncok@redhat.com> - 6.1.0-4
8e777d6
- Drop a redundant runtime dependency on setuptools
8e777d6
6523a2c
* Mon Nov 29 2021 Karolina Surma <ksurma@redhat.com> - 6.1.0-3
6523a2c
- Remove -s from Python shebang in `jupyter-nbconvert` to let Jupyter see 
6523a2c
  pip installed extensions
6523a2c
9312a4e
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.0-2
9312a4e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
9312a4e
60ecf22
* Sun Jun 27 2021 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 6.1.0-1
60ecf22
- Update to 6.1.0
60ecf22
1a06bbe
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 6.0.7-4
1a06bbe
- Rebuilt for Python 3.10
1a06bbe
97cf3ae
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 6.0.7-3
97cf3ae
- Bootstrap for Python 3.10
97cf3ae
731baa9
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.7-2
731baa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
731baa9
82a12ba
* Wed Nov 25 2020 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 6.0.7-1
82a12ba
- Update to 6.0.7
82a12ba
b369d6c
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.1-4
b369d6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
b369d6c
8dec163
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 5.6.1-3
8dec163
- Rebuilt for Python 3.9
8dec163
1446ed6
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 5.6.1-2
1446ed6
- Bootstrap for Python 3.9
1446ed6
f6e326d
* Mon May 04 2020 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 5.6.1-1
f6e326d
- Update to 5.6.1
f6e326d
054997d
* Sun May 03 2020 Miro Hrončok <mhroncok@redhat.com> - 5.6.0-4
054997d
- Recommend Inkscape for SVG to PDF conversion (#1830647)
054997d
- Fix compatibility with Inkscape 1.0rc1
ae5f8eb
- Recommend Pandoc for format conversions
054997d
ccea7c1
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.0-3
ccea7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ccea7c1
5993a86
* Thu Sep 26 2019 Miro Hrončok <mhroncok@redhat.com> - 5.6.0-2
5993a86
- Correct the BR of python3-jupyter-core
5993a86
5eb6e15
* Mon Sep 02 2019 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 5.6.0-1
5eb6e15
- Update to 5.6.0
5eb6e15
5075ada
* Sun Aug 18 2019 Miro Hrončok <mhroncok@redhat.com> - 5.5.0-4
5075ada
- Rebuilt for Python 3.8
5075ada
da5fb07
* Sun Aug 18 2019 Miro Hrončok <mhroncok@redhat.com> - 5.5.0-3
da5fb07
- Bootstrap for Python 3.8
da5fb07
fe3bec4
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.0-2
fe3bec4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
fe3bec4
e54a31f
* Sun Apr 28 2019 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 5.5.0-1
e54a31f
- Update to 5.5.0
e54a31f
d800ed6
* Sun Feb 10 2019 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 5.4.1-1
d800ed6
- Update to 5.4.1
d800ed6
e10db6f
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.0-2
e10db6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
e10db6f
f17cf84
* Thu Dec 13 2018 Miro Hrončok <mhroncok@redhat.com> - 5.4.0-1
f17cf84
- Update to 5.4.0
f17cf84
2f9143e
* Mon Nov 12 2018 Miro Hrončok <mhroncok@redhat.com> - 5.3.1-11
2f9143e
- Remove Python 2 subpackage
2f9143e
4eb622e
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.1-10
4eb622e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
4eb622e
67e2ca5
* Wed Jun 20 2018 Miro Hrončok <mhroncok@redhat.com> - 5.3.1-9
67e2ca5
- Rebuilt for Python 3.7
67e2ca5
8165309
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 5.3.1-8
82c421a
- Bootstrap for Python 3.7
8165309
9715e35
* Mon Mar 19 2018 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 5.3.1-7
9715e35
- Remove pandoc as requires. Only pandocfilters is needed
9715e35
9612f16
* Mon Mar 19 2018 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 5.3.1-6
9612f16
- Add jupyter-client and defusedxml as requires
9612f16
5ee506d
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.1-5
5ee506d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
5ee506d
f63bb33
* Sat Jan 13 2018 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 5.3.1-4
f63bb33
- Add python-mistune, python-bleach and pandoc as dependencies
f63bb33
a1e34c3
* Wed Jan 03 2018 Lumír Balhar <lbalhar@redhat.com> - 5.3.1-3
a1e34c3
- Fix directory ownership in python subpackages
a1e34c3
44220db
* Wed Dec 27 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 5.3.1-2
44220db
- license file renamed to LICENSE (from copying.md)
44220db
86c31ca
* Wed Dec 27 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 5.3.1-1
86c31ca
- Update to 5.3.1
86c31ca
839ef6d
* Mon Dec 11 2017 Iryna Shcherbina <ishcherb@redhat.com> - 5.2.1-5
839ef6d
- Fix ambiguous Python 2 dependency declarations
839ef6d
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
839ef6d
581f2b5
* Mon Oct 02 2017 Mukundan Ragavan <nonamedotc@gmail.com> - 5.2.1-4
581f2b5
- Fix requires (added pandocfilters and testpath)
581f2b5
be2a201
* Fri Sep 01 2017 Miro Hrončok <mhroncok@redhat.com> - 5.2.1-3
be2a201
- Move executables from py2 to py3 (#1410332)
c5f6e3c
- Add BRs to make the docs build
be2a201
855b317
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.1-2
855b317
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
855b317
6fa94ec
* Thu May 25 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 5.2.1-1
6fa94ec
- Update to 5.2.1
6fa94ec
eeb8ea9
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.0-7
eeb8ea9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
eeb8ea9
268f084
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 4.2.0-6
268f084
- Rebuild for Python 3.6
268f084
040b559
* Thu Nov 03 2016 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 4.2.0-5
040b559
- Python dep chain fixed
040b559
- Fixes bug#1391124
040b559
acfadb1
* Wed Nov 02 2016 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 4.2.0-4
acfadb1
- Fix pulling entire python{2,3} stack as deps
acfadb1
- Fixes bug#1391124
acfadb1
fb7b1e1
* Sun Oct 02 2016 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 4.2.0-3
fb7b1e1
- Fix issues pointed out by rpmlint
fb7b1e1
- Fix license field
fb7b1e1
fb7b1e1
* Thu Aug 11 2016 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 4.2.0-2
fb7b1e1
- Fix build errors
fb7b1e1
fb7b1e1
* Thu Aug 11 2016 Mukundan Ragavan <nonamedotc@gmail.com> - 4.2.0-1
fb7b1e1
- Initial package.