From 26ab964e29b183483eb0924b9d02b7ef5b4e8727 Mon Sep 17 00:00:00 2001 From: Guang Yee Date: Fri, 19 Oct 2018 15:58:48 -0700 Subject: [PATCH] Initial package for cinder-tempest-plugin Change-Id: If6df31fcfaccc229ea465f3c1b2f6ff61b875a18 --- .../cinder-tempest-plugin.spec.j2 | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 openstack/cinder-tempest-plugin/cinder-tempest-plugin.spec.j2 diff --git a/openstack/cinder-tempest-plugin/cinder-tempest-plugin.spec.j2 b/openstack/cinder-tempest-plugin/cinder-tempest-plugin.spec.j2 new file mode 100644 index 000000000..fa528be03 --- /dev/null +++ b/openstack/cinder-tempest-plugin/cinder-tempest-plugin.spec.j2 @@ -0,0 +1,77 @@ +{% set pypi_name = 'cinder-tempest-plugin' %} +{% set source=fetch_source('https://tarballs.openstack.org/cinder-tempest-plugin/cinder-tempest-plugin-master.tar.gz') %} +{% set upstream_version = upstream_version() %} +{% set rpm_release = '1' %} + +%global sname cinder_tempest_plugin +%global with_doc 0 +%global common_desc \ +This package contains Tempest tests to cover the cinder project. \ +Additionally it provides a plugin to automatically load these tests into Tempest. +Name: {{ py2pkg('cinder-tempest-plugin') }} +Version: {{ py2rpmversion() }} +Release: {{ py2rpmrelease() }} +Summary: Tempest plugin for the cinder project +License: {{ license('Apache-2.0') }} +Group: Development/Languages/Python +URL: https://git.openstack.org/cgit/openstack/{{ pypi_name }} +Source0: {{ source|basename }} +BuildRequires: openstack-macros +BuildRequires: {{ py2pkg('devel') }} +BuildRequires: {{ py2pkg('pbr') }} +BuildRequires: {{ py2pkg('setuptools') }} +Requires: {{ py2pkg('Tempest') }} +Requires: {{ py2pkg('oslo.config') }} +Requires: {{ py2pkg('oslo.serialization') }} +Requires: {{ py2pkg('pbr') }} +Requires: {{ py2pkg('six') }} +Requires: {{ py2pkg('testtools') }} +BuildArch: noarch + +%description +%{common_desc} + +%if 0%{?with_doc} +%package doc +Summary: Documentation for cinder tempest plugin +BuildRequires: {{ py2pkg('Sphinx') }} +BuildRequires: {{ py2pkg('oslosphinx') }} + +%description doc +It contains the documentation for the cinder tempest tests. +%endif + +%prep +%autosetup -n cinder_tempest_plugin-{{ upstream_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}/cinder_tempest_plugin +%{python2_sitelib}/*.egg-info + +%if 0%{?with_doc} +%files doc +%doc doc/build/html +%license LICENSE +%endif + +%changelog