File python-jupyter_core-doc.spec of Package python-jupyter_core

#
# spec file for package python-jupyter_core
#
# 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:           python-jupyter_core-doc
Version:        4.0.6
Release:        0
Summary:        Documentation for python-jupyter_core
License:        BSD-3-Clause
Group:          Development/Languages/Python
Url:            http://jupyter.org
Source:         https://pypi.python.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz
BuildRequires:  python-jupyter_core
# Documentation requirements
BuildRequires:  python-Sphinx
%if %{build_pdf}
BuildRequires:  python-Sphinx-latex
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Documentation and help files for python3-jupyter_core.

%package html
Summary:        HTML documentation for python-jupyter_core
Recommends:     python-jupyter_core = %{version}

%description html
Documentation and help files for python-jupyter_core in HTML format.

%package pdf
Summary:        PDF documentation for python-jupyter_core
Recommends:     python-jupyter_core = %{version}

%description pdf
Documentation and help files for python-jupyter_core in PDF format.


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

%build
# Not needed

%install
# Build the documentation
pushd docs
%if %{build_pdf}
PYTHONPATH=%{buildroot}%{python_sitelib} make latexpdf
%endif
PYTHONPATH=%{buildroot}%{python_sitelib} make html
rm -rf _build/html/.buildinfo
popd
 
%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/jupyter_core.pdf
%endif

%changelog
openSUSE Build Service is sponsored by