File python-tooz.spec of Package python-tooz

#
# spec file for package python-tooz
#
# 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 http://bugs.opensuse.org/
#


%global pypi_name tooz
Name:           python-tooz
Version:        1.43.2
Release:        0
Summary:        Coordination library for distributed systems
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            http://docs.openstack.org/developer/tooz/
Source0:        https://pypi.io/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-devel
BuildRequires:  python-pbr
BuildRequires:  python-setuptools
BuildRequires:  python-testtools
Requires:       python-Babel
Requires:       python-enum34
Requires:       python-fasteners
Requires:       python-futures
Requires:       python-futurist
Requires:       python-iso8601
Requires:       python-msgpack-python
Requires:       python-oslo.serialization
Requires:       python-oslo.utils
Requires:       python-retrying
Requires:       python-six
Requires:       python-stevedore
Requires:       python-voluptuous
Requires:       python-zake
BuildArch:      noarch

%description
The Tooz project aims at centralizing the most common distributed primitives
like group membership protocol, lock service and leader election by providing
a coordination API helping developers to build distributed applications.

%package doc
Summary:        Documentation for %{name}
Group:          Documentation
BuildRequires:  python-Sphinx
BuildRequires:  python-enum34
BuildRequires:  python-futures
BuildRequires:  python-oslo.utils
BuildRequires:  python-oslosphinx
BuildRequires:  python-stevedore

%description doc
The Tooz project aims at centralizing the most common distributed primitives
like group membership protocol, lock service and leader election by providing
a coordination API helping developers to build distributed applications.

This package contains documentation in HTML format.

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

%build
%py2_build

# generate html docs
%{__python2} setup.py build_sphinx
# remove the Sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

%check
%{__python2} setup.py testr

%install
%py2_install

%files
%license LICENSE
%doc README.rst
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-*.egg-info

%files doc
%license LICENSE
%doc doc/build/html

%changelog