File python3-jupyter_nbformat-doc.spec of Package python3-jupyter_nbformat

#
# spec file for package python3-jupyter_nbformat-doc
#
# Copyright (c) 2016 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/
#


%if 0%{?suse_version} && ( 0%{?suse_version} != 1315 && 0%{?suse_version} > 1110 )
%define build_pdf 1
%else
%define build_pdf 0
%endif

Name:           python3-jupyter_nbformat-doc
Version:        4.0.1
Release:        0
Summary:        Documentation for python3-jupyter_nbformat
License:        BSD-3-Clause
Group:          Documentation/Other
Url:            http://jupyter.org
Source:         https://files.pythonhosted.org/packages/source/n/nbformat/nbformat-%{version}.tar.gz
BuildRequires:  python3-jupyter_nbformat
# Documentation requirements
BuildRequires:  python3-Sphinx
BuildRequires:  python3-numpydoc
%if %{build_pdf}
BuildRequires:  python3-Sphinx-latex
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Documentation and help files for python3-jupyter_nbformat.
 
%package html
Summary:        HTML documentation for python3-jupyter_nbformat
Group:          Documentation/HTML
Recommends:     python3-jupyter_nbformat = %{version}

%description html
Documentation and help files for python3-jupyter_nbformat in HTML format.

%package pdf
Summary:        PDF documentation for python3-jupyter_nbformat
Group:          Documentation/Other
Recommends:     python3-jupyter_nbformat = %{version}

%description pdf
Documentation and help files for python3-jupyter_nbformat in PDF format.

%prep
%setup -q -n nbformat-%{version}

%build
# Not needed

%install
# Build the documentation
pushd docs
PYTHONPATH=%{buildroot}%{python3_sitelib} make html
%if %{build_pdf}
PYTHONPATH=%{buildroot}%{python3_sitelib} make latexpdf
%endif
rm -rf _build/html/.buildinfo

%files html
%defattr(-,root,root,-)
%doc COPYING.md
%doc docs/_build/html/

%if %{build_pdf}
%files pdf
%defattr(-,root,root,-)
%doc COPYING.md
%doc docs/_build/latex/*.pdf
%endif

%changelog
openSUSE Build Service is sponsored by