File python-cotyledon.spec of Package python-cotyledon

#
# spec file for package python
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global sname cotyledon
Name:           python-%{sname}
Version:        1.6.8
Release:        0
Summary:        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_module devel}
BuildRequires:  %{python_module os-testr}
BuildRequires:  %{python_module oslo.config}
BuildRequires:  %{python_module oslotest}
BuildRequires:  %{python_module pbr}
BuildRequires:  %{python_module setproctitle}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module testrepository}
BuildRequires:  %{python_module testscenarios}
BuildRequires:  python-rpm-macros
BuildArch:      noarch

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

%python_subpackages

%package -n python-%{sname}-doc
Summary:        Documentation for cotyledon, a framework for long-running services
Group:          Documentation/HTML
BuildRequires:  python-Sphinx
BuildRequires:  python-oslosphinx
Requires:       %{name} = %{version}

%description -n python-%{sname}-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_build
python setup.py build_sphinx
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
%python_install

%check
%ifpython2
PATH=$PATH:%{buildroot}/usr/bin PYTHONPATH=%{buildroot}%{python_sitelib} python2 setup.py test
%endif

# %xpython_exec setup.py test

%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/%{sname}
%{python_sitelib}/*.egg-info

%files -n python-%{sname}-doc
%license LICENSE
%doc README.rst
%doc doc/build/html

%changelog
openSUSE Build Service is sponsored by