File python-cotyledon.spec of Package python-cotyledon

#
# spec file for package python
#
# Copyright (c) 2017 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/
#


%global sname cotyledon
Name:           python-%{sname}
Version:        1.6.8
Release:        0
Summary:        Cotyledon provides a framework for defining long-running services
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            https://github.com/sileht/cotyledon
Source:         https://files.pythonhosted.org/packages/source/c/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires:  python-oslo.config
BuildRequires:  python-oslotest
BuildRequires:  python-pbr
BuildRequires:  python-setproctitle
BuildRequires:  python-testrepository
BuildRequires:  python-testscenarios
BuildRequires:  python-testtools
Requires:       python-setproctitle
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Cotyledon provides a framework for defining long-running services.

%package doc
Summary:        %{summary} - Documentation
Group:          Documentation/HTML
BuildRequires:  python-Sphinx
BuildRequires:  python-oslosphinx
Requires:       %{name} = %{version}

%description doc
Cotyledon provides a framework for defining long-running services.

This package contains documentation files for %{name}.

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

%build
python setup.py build
python setup.py build_sphinx
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%check
# Needed to find cotyledon-example
PATH=$PATH:%{buildroot}/usr/bin PYTHONPATH=%{buildroot}%{python_sitelib} python setup.py test

%files
%defattr(-,root,root,-)
%doc ChangeLog README.rst LICENSE
%{python_sitelib}/%{sname}
%{python_sitelib}/*.egg-info

%files doc
%defattr(-,root,root,-)
%doc ChangeLog README.rst LICENSE
%doc doc/build/html

%changelog
openSUSE Build Service is sponsored by