rpm-packaging/openstack/kuryr-tempest-plugin/kuryr-tempest-plugin.spec.j2

79 lines
2.0 KiB
Django/Jinja

{% set pypi_name = 'kuryr-tempest-plugin' %}
{% set upstream_version = upstream_version('0.4.0') %}
{% set rpm_release = '1' %}
{% set source = url_pypi() %}
%global sname kuryr-tempest-plugin
%global with_doc 0
%global common_desc \
This package contains Tempest tests to cover the kuryr-kubernetes project. \
Additionally it provides a plugin to automatically load these tests into Tempest.
Name: {{ py2pkg('kuryr-tempest-plugin') }}
Version: {{ py2rpmversion() }}
Release: {{ py2rpmrelease() }}
Summary: Tempest plugin for the kuryr project.
License: {{ license('Apache-2.0') }}
Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/{{ pypi_name }}
Source0: {{ source }}
BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('pbr') }}
BuildRequires: {{ py2pkg('reno') }}
BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('Tempest') }}
Requires: {{ py2pkg('kubernetes') }}
Requires: {{ py2pkg('oslotest') }}
Requires: {{ py2pkg('pbr') }}
Requires: {{ py2pkg('six') }}
Requires: {{ py2pkg('testrepository') }}
Requires: {{ py2pkg('testtools') }}
BuildArch: noarch
%description
%{common_desc}
%if 0%{?with_doc}
%package doc
Summary: Documentation for kuryr tempest plugin
BuildRequires: {{ py2pkg('Sphinx') }}
BuildRequires: {{ py2pkg('oslosphinx') }}
%description doc
It contains the documentation for the kuryr tempest tests.
%endif
%prep
%autosetup -n %{sname}-%{version}
# Let's handle dependencies ourseleves
%py_req_cleanup
# Remove bundled egg-info
rm -rf %{module}.egg-info
%build
%{py2_build}
# Generate Docs
%if 0%{?with_doc}
%{__python2} setup.py build_sphinx
# remove the sphinx build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%endif
%install
%{py2_install}
%files
%license LICENSE
%doc README.rst
%{python2_sitelib}/kuryr_tempest_plugin
%{python2_sitelib}/*.egg-info
%if 0%{?with_doc}
%files doc
%doc doc/build/html
%license LICENSE
%endif
%changelog