File python-jupyter_nbsphinx.spec of Package python-jupyter_nbsphinx
#
# spec file for package python-jupyter_nbsphinx
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-jupyter_nbsphinx
Version: 0.3.3
Release: 0
Summary: Jupyter Notebook Tools for Sphinx
License: MIT
Group: Development/Languages/Python
Url: https://github.com/spatialaudio/nbsphinx/
Source: https://files.pythonhosted.org/packages/source/n/nbsphinx/nbsphinx-%{version}.tar.gz
BuildRequires: %{python_module Send2Trash}
BuildRequires: %{python_module Sphinx >= 1.3.2}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module docutils}
BuildRequires: %{python_module jupyter_notebook}
BuildRequires: %{python_module py}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Jinja2
Requires: python-Send2Trash
Requires: python-Sphinx >= 1.3.2
Requires: python-docutils
Requires: python-jupyter_nbconvert
Requires: python-jupyter_nbformat
Requires: python-py
Requires: python-sphinx_rtd_theme
Recommends: mathjax
Recommends: pandoc
%ifpython2
Recommends: python3-jupyter_nbsphinx
%endif
BuildArch: noarch
%python_subpackages
%description
The nbsphinx package is a Sphinx extension that provides a source
parser for *.ipynb files. Custom Sphinx directives are used to show
Jupyter Notebook code cells (and of course their results) in both HTML
and LaTeX output. Un-evaluated notebooks – i.e. notebooks without
stored output cells – will be automatically executed during the Sphinx
build process.
%prep
%setup -q -n nbsphinx-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
jupyter nbextension install --prefix=%{buildroot}%{_prefix} src/nbsphinx.py
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE NEWS.rst README.rst
%{python_sitelib}/nbsphinx.py*
%pycache_only %{python_sitelib}/__pycache__/nbsphinx.*.py*
%{python_sitelib}/nbsphinx-%{version}-py*.egg-info
%python3_only %{_datadir}/jupyter/nbextensions/nbsphinx.py
%changelog