File python-oslo.concurrency.spec of Package python-oslo.concurrency

#
# spec file for package python-oslo.concurrency
#
# Copyright (c) 2020 SUSE LLC
#
# 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/
#


%global sname oslo.concurrency
Name:           python-oslo.concurrency
Version:        3.21.2
Release:        0
Summary:        OpenStack oslo.concurrency library
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/%{sname}
Source0:        https://files.pythonhosted.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-devel
BuildRequires:  python-enum34
BuildRequires:  python-eventlet
BuildRequires:  python-fasteners
BuildRequires:  python-fixtures
BuildRequires:  python-futures
BuildRequires:  python-mock
BuildRequires:  python-oslo.config
BuildRequires:  python-oslo.i18n
BuildRequires:  python-oslo.utils
BuildRequires:  python-oslotest
BuildRequires:  python-pbr
BuildRequires:  python-testrepository
BuildRequires:  python-testscenarios
BuildRequires:  python-testtools
Requires:       python-enum34
Requires:       python-fasteners
Requires:       python-iso8601
Requires:       python-oslo.config
Requires:       python-oslo.i18n
Requires:       python-oslo.utils
Requires:       python-retrying
Requires:       python-six
BuildArch:      noarch

%description
The oslo.concurrency library has utilities for safely running multi-thread,
multi-process applications using locking mechanisms and for running
external processes.

%package doc
Summary:        Documentation for OpenStack concurrency library
Group:          Development/Languages/Python
BuildRequires:  python-Sphinx
BuildRequires:  python-openstackdocstheme

%description doc
The oslo.concurrency library has utilities for safely running multi-thread,
multi-process applications using locking mechanisms and for running
external processes.
This package contains the documentation.

%prep
%autosetup -n %{sname}-%{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 doc/build/html/.{doctrees,buildinfo}

%install
%{py2_install}

%check
# Test suite fails on 32 bit platforms
# ifarch/ifnarch can not be used in noarch packages
if [ "%_lib" = "lib64" ]; then
%{__python2} setup.py testr
fi

%files
%license LICENSE
%doc README.rst ChangeLog
%_bindir/lockutils-wrapper
%{python2_sitelib}/oslo_concurrency
%{python2_sitelib}/*.egg-info

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

%changelog
openSUSE Build Service is sponsored by