File python-manuel.spec of Package python-manuel

# spec file for package python-manuel
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2013-2018 LISA GmbH, Bingen, 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

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-manuel
Version:        1.10.1
Release:        0
Summary:        Python module to build tested documentation
License:        Apache-2.0
# add fixed sphinx config <>
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module six}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-six
BuildArch:      noarch
# SECTION Documentation requirements:
BuildRequires:  python3-Sphinx
# SECTION Testing requirements:
BuildRequires:  %{python_module zope.testing}

Manuel lets the user build tested documentation.

Documentation, a full list of included plug-ins, and examples are available
with the -doc package and at

%package        doc
Summary:        Build tested documentation

%description    doc
This package contains documentation files for %{name}.

%setup -q -n manuel-%{version}
cp %{SOURCE1} .

%{python_expand # build docs only one time with primary python3 flavor
if [ $(which $python) -ef $(which python3) ]; then
  $python build_sphinx
  rm build/sphinx/html/.buildinfo

%python_expand %fdupes %{buildroot}%{$python_sitelib}

%python_exec -q test

%files %{python_files}
%license LICENSE.rst

%files %{python_files doc}
%doc build/sphinx/html

openSUSE Build Service is sponsored by