File python-ceilometermiddleware.spec of Package python-ceilometermiddleware

#
# spec file for package python-ceilometermiddleware
#
# 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 pypi_name ceilometermiddleware
Name:           python-ceilometermiddleware
Version:        1.1.0
Release:        0
Summary:        A library for metric and event data generation for Ceilometer
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            http://docs.openstack.org/developer/ceilometermiddleware
Source0:        https://pypi.io/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-devel
BuildRequires:  python-mock >= 2.0
BuildRequires:  python-oslo.config >= 4.0.0
BuildRequires:  python-oslo.messaging >= 5.24.2
BuildRequires:  python-oslo.utils >= 3.20.0
BuildRequires:  python-oslotest >= 1.10.0
BuildRequires:  python-pbr >= 2.0.0
BuildRequires:  python-pycadf >= 1.1.0
BuildRequires:  python-python-subunit >= 0.0.18
BuildRequires:  python-setuptools >= 16.0
BuildRequires:  python-testrepository >= 0.0.18
Requires:       python-oslo.config >= 4.0.0
Requires:       python-oslo.messaging >= 5.24.2
Requires:       python-oslo.utils >= 3.20.0
Requires:       python-pbr >= 2.0.0
Requires:       python-pycadf >= 1.1.0
Requires:       python-six >= 1.9.0
BuildArch:      noarch

%description
This library provides middleware modules designed to enable metric and
event data generation to be consumed by Ceilometer.

%package doc
Summary:        Documentation for %{name}
Group:          Documentation
BuildRequires:  python-Sphinx
BuildRequires:  python-oslosphinx >= 4.7.0

%description doc
This library provides middleware modules designed to enable metric and
event data generation to be consumed by Ceilometer.

This package contains documentation in HTML format.

%prep
%autosetup -n %{pypi_name}-%{version}
%py_req_cleanup

%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
openSUSE Build Service is sponsored by