python-manuel/python-manuel.spec

81 lines
2.5 KiB
RPMSpec

#
# spec file for package python-manuel
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2013 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 http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-manuel
Version: 1.8.0
Release: 0
Summary: Build tested documentation
License: Apache-2.0
Group: Development/Languages/Python
Url: http://www.python.org/pypi/manuel
Source: https://files.pythonhosted.org/packages/source/m/manuel/manuel-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
# Documentation requirements:
BuildRequires: %{python_module Sphinx}
# Testing requirements:
BuildRequires: %{python_module zope.testing}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
Manuel lets you build tested documentation.
Documentation, a full list of included plug-ins, and examples are available
with the -doc package and at http://packages.python.org/manuel/.
%package doc
Summary: Build tested documentation
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description doc
This package contains documentation files for %{name}.
%prep
%setup -q -n manuel-%{version}
rm -rf docs/.doctrees docs/.buildinfo docs/objects.inv
%build
%python_build
%{_python_use_flavor python3}
%__python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%check
%python_exec setup.py -q test
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGES.rst COPYRIGHT.rst LICENSE.rst PKG-INFO README.rst
%{python_sitelib}/*
%files %{python_files doc}
%defattr(-,root,root,-)
%doc docs/
%changelog