%global pypi_name oslo.reports %if 0%{?fedora} %global with_python3 1 %endif %{!?upstream_version: %global upstream_version %{version}%{?milestone}} Name: python-oslo-reports Version: 0.5.0 Release: 1%{?dist} Summary: Openstack common reports library License: ASL 2.0 URL: http://launchpad.net/oslo Source0: http://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz BuildArch: noarch %description The Oslo project intends to produce a python library containing infrastructure code shared by OpenStack projects. The APIs provided by the project should be high quality, stable, consistent and generally useful. OpenStack library for creating Guru Meditation Reports and other reports. %package -n python2-oslo-reports Summary: Openstack common reports library %{?python_provide:%python_provide python2-oslo-reports} BuildRequires: python2-devel BuildRequires: python-pbr BuildRequires: python-sphinx Requires: python-jinja2 Requires: python-babel Requires: python-oslo-i18n >= 1.5.0 Requires: python-oslo-serialization >= 1.4.0 Requires: python-oslo-utils >= 1.6.0 Requires: python-psutil Requires: python-six >= 1.9.0 %description -n python2-oslo-reports The Oslo project intends to produce a python library containing infrastructure code shared by OpenStack projects. The APIs provided by the project should be high quality, stable, consistent and generally useful. OpenStack library for creating Guru Meditation Reports and other reports. %package -n python2-oslo-reports-doc Summary: Documentation for OpenStack common messaging library BuildRequires: python-sphinx BuildRequires: python-oslo-sphinx %description -n python2-oslo-reports-doc Documentation for the oslo.messaging library. %if 0%{?with_python3} %package -n python3-oslo-reports Summary: Openstack common reports library %{?python_provide:%python_provide python3-oslo-reports} BuildRequires: python3-devel BuildRequires: python3-pbr BuildRequires: python3-sphinx Requires: python3-jinja2 Requires: python3-babel Requires: python3-oslo-i18n >= 1.5.0 Requires: python3-oslo-serialization >= 1.4.0 Requires: python3-oslo-utils >= 1.6.0 Requires: python3-psutil Requires: python3-six >= 1.9.0 %description -n python3-oslo-reports The Oslo project intends to produce a python library containing infrastructure code shared by OpenStack projects. The APIs provided by the project should be high quality, stable, consistent and generally useful. OpenStack library for creating Guru Meditation Reports and other reports. %endif %prep %setup -q -n %{pypi_name}-%{upstream_version} # let RPM handle deps rm -rf {test-,}requirements.txt %build %{__python2} setup.py build %if 0%{?with_python3} %{__python3} setup.py build %endif # generate html docs sphinx-build doc/source html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %install %{__python2} setup.py install --skip-build --root %{buildroot} %if 0%{?with_python3} %{__python3} setup.py install --skip-build --root %{buildroot} %endif %check %{__python2} setup.py test %if 0%{?with_python3} %{__python3} setup.py test %endif %files -n python2-oslo-reports %license LICENSE %doc README.rst %{python2_sitelib}/oslo_reports %{python2_sitelib}/*.egg-info %if 0%{?with_python3} %files -n python3-oslo-reports %license LICENSE %doc README.rst %{python3_sitelib}/oslo_reports %{python3_sitelib}/*.egg-info %endif %files -n python2-oslo-reports-doc %license LICENSE %doc html %changelog * Tue Sep 15 2015 Lukas Bezdicka - 0.5.0-1 - Initial packaging