fb7b1e1
%global pypi_name nbconvert
fb7b1e1
fb7b1e1
Name:           python-%{pypi_name}
d800ed6
Version:        5.4.1
d800ed6
Release:        1%{?dist}
fb7b1e1
Summary:        Converting Jupyter Notebooks
fb7b1e1
fb7b1e1
License:        BSD and MIT
fb7b1e1
URL:            http://jupyter.org
2f9143e
Source0:        %pypi_source
fb7b1e1
BuildArch:      noarch
2f9143e
c5f6e3c
BuildRequires:  python3-pandocfilters
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
e695cd7
BuildRequires:  python3-jinja2
f17cf84
BuildRequires:  python3-jupyter_core
e695cd7
BuildRequires:  python3-mistune
e695cd7
BuildRequires:  python3-nbformat
f17cf84
BuildRequires:  python3-nose
f17cf84
BuildRequires:  python3-pytest
f17cf84
#BuildRequires:  texlive-xetex -- those are failing for now
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
fb7b1e1
%{?python_provide:%python_provide python3-%{pypi_name}}
f17cf84
f17cf84
Requires:       %{py3_dist setuptools}
f17cf84
%{?python_enable_dependency_generator}
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
fb7b1e1
%autosetup -n %{pypi_name}-%{version}
fb7b1e1
rm -rf %{pypi_name}.egg-info
fb7b1e1
fb7b1e1
%build
fb7b1e1
%py3_build
fb7b1e1
82c421a
%if %{with doc}
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
f17cf84
export PYTHONPATH=%{buildroot}%{python3_sitelib}
f17cf84
# https://github.com/jupyter/nbconvert/issues/815
f17cf84
# https://github.com/jupyter/nbconvert/issues/928
f17cf84
# test_markdown2rst - our pandoc is too new
f17cf84
# test_minimal_version - our pandoc is too new
f17cf84
# test_pandoc_available - our pandoc is too new
f17cf84
# test_run_notebooks - slightly different output, probably a jupyter version mismatch
f17cf84
%{__python3} -m pytest -v -k "not test_markdown2rst and not test_minimal_version and not test_pandoc_available and not test_run_notebooks"
f17cf84
%endif
f17cf84
fb7b1e1
%files -n python3-%{pypi_name}
44220db
%license LICENSE
fb7b1e1
%doc docs/README.md
be2a201
%{_bindir}/jupyter-nbconvert
fb7b1e1
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
a1e34c3
%{python3_sitelib}/%{pypi_name}/
fb7b1e1
82c421a
%if %{with doc}
fb7b1e1
%files -n python-%{pypi_name}-doc
6fa94ec
%doc html
82c421a
%endif
fb7b1e1
fb7b1e1
%changelog
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.