Files
rpm-packaging/openstack/ceilometermiddleware/ceilometermiddleware.spec.j2
Dirk Mueller bb2ae52f2a Use setuptools instead of distribute (which is part of devel)
By building the package with setuptools, we ensure it is compatible
with pip 10 and above which require file manifests to be packaged.

Change-Id: Id4461b5437f0e8592bc8c3ba9581344477a34876
2019-03-11 18:02:11 +00:00

83 lines
2.4 KiB
Django/Jinja

{% set pypi_name = 'ceilometermiddleware' %}
{% set upstream_version = upstream_version('1.3.0') %}
{% set rpm_release = '1' %}
{% set source = url_pypi() %}
Name: {{ py2name() }}
Version: {{ py2rpmversion() }}
Release: {{ py2rpmrelease() }}
Summary: A library for metric and event data generation for Ceilometer
License: {{ license('Apache-2.0') }}
Group: Development/Languages/Python
URL: https://docs.openstack.org/developer/ceilometermiddleware
Source0: {{ source }}
BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('betamax') }}
BuildRequires: {{ py2pkg('keystoneauth1') }}
BuildRequires: {{ py2pkg('python-keystoneclient') }}
BuildRequires: {{ py2pkg('mock') }}
BuildRequires: {{ py2pkg('oslo.config') }}
BuildRequires: {{ py2pkg('oslo.messaging') }}
BuildRequires: {{ py2pkg('oslo.utils') }}
BuildRequires: {{ py2pkg('oslotest') }}
BuildRequires: {{ py2pkg('pbr') }}
BuildRequires: {{ py2pkg('pycadf') }}
BuildRequires: {{ py2pkg('python-subunit') }}
BuildRequires: {{ py2pkg('setuptools') }}
BuildRequires: {{ py2pkg('testrepository') }}
Requires: {{ py2pkg('keystoneauth1') }}
Requires: {{ py2pkg('python-keystoneclient') }}
Requires: {{ py2pkg('oslo.config') }}
Requires: {{ py2pkg('oslo.messaging') }}
Requires: {{ py2pkg('oslo.utils') }}
Requires: {{ py2pkg('pbr') }}
Requires: {{ py2pkg('pycadf') }}
Requires: {{ py2pkg('six') }}
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/HTML
BuildRequires: {{ py2pkg('Sphinx') }}
BuildRequires: {{ py2pkg('oslosphinx') }}
%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 -p1 -n {{ pypi_name }}-{{ upstream_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