File python-tooz.spec of Package python-tooz
#
# spec file for package python-tooz
#
# Copyright (c) 2018 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
%if 0%{?rhel} || 0%{?fedora}
%global rdo 1
%endif
Name: python-tooz
Version: 1.60.0
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://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildRequires: memcached
BuildRequires: openstack-macros
BuildRequires: python-devel
BuildRequires: python-enum34 >= 1.0.4
BuildRequires: python-fasteners >= 0.7.0
BuildRequires: python-fixtures >= 3.0.0
BuildRequires: python-futures >= 3.0.0
BuildRequires: python-futurist >= 1.2.0
BuildRequires: python-iso8601 >= 0.1.11
BuildRequires: python-mock >= 2.0.0
BuildRequires: python-oslo.serialization >= 2.18.0
BuildRequires: python-oslo.utils >= 3.33.0
BuildRequires: python-pbr >= 2.0.0
BuildRequires: python-pifpaf >= 0.10.0
BuildRequires: python-pymemcache >= 1.2.9
BuildRequires: python-setuptools >= 16.0
BuildRequires: python-stevedore >= 1.20.0
BuildRequires: python-tenacity >= 3.2.1
BuildRequires: python-testtools >= 2.2.0
BuildRequires: python-voluptuous >= 0.8.9
Requires: python-Babel >= 2.3.4
Requires: python-enum34 >= 1.0.4
Requires: python-fasteners >= 0.7.0
Requires: python-futures >= 3.0.0
Requires: python-futurist >= 1.2.0
Requires: python-iso8601 >= 0.1.11
Requires: python-msgpack >= 0.4.0
Requires: python-oslo.serialization >= 2.18.0
Requires: python-oslo.utils >= 3.33.0
Requires: python-six >= 1.10.0
Requires: python-stevedore >= 1.20.0
Requires: python-tenacity >= 3.2.1
Requires: python-voluptuous >= 0.8.9
Requires: python-zake >= 0.1.6
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/HTML
BuildRequires: python-Sphinx
BuildRequires: python-openstackdocstheme >= 1.18.1
BuildRequires: python-redis >= 2.10.0
%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
%autosetup -n %{pypi_name}-%{version}
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg
%build
%py2_build
# generate html docs
%{__python2} setup.py build_sphinx
# remove the Sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%check
%if ! 0%{?rdo}
export TOOZ_TEST_DRIVERS="memcached"
export PATH=%{_prefix}/sbin:$PATH
bash run-tests.sh
%endif
%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