Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial spec file of manila-tempest-plugin #5

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions openstack/manila-tempest-plugin/manila-tempest-plugin.spec.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{% set pypi_name = 'manila-tempest-plugin' %}
{% set rpm_release = '1' %}
{% set source=fetch_source('https://tarballs.openstack.org/manila-tempest-plugin/manila-tempest-plugin-master.tar.gz') %}
{% set upstream_version = upstream_version() %}

%global sname manila-tempest-plugin
%global with_doc 0
%global common_desc \
This package contains Tempest tests to cover the manila project. \
Additionally it provides a plugin to automatically load these tests into Tempest.
Name: {{ py2pkg('manila-tempest-plugin') }}
Version: {{ py2rpmversion() }}
Release: {{ py2rpmrelease() }}
Summary: Tempest plugin for the manila 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('ddt') }}
Requires: {{ py2pkg('dnspython') }}
Requires: {{ py2pkg('testtools') }}
BuildArch: noarch

%description
%{common_desc}

%if 0%{?with_doc}
%package doc
Summary: Documentation for manila tempest plugin
BuildRequires: {{ py2pkg('Sphinx') }}
BuildRequires: {{ py2pkg('oslosphinx') }}

%description doc
It contains the documentation for the manila tempest tests.
%endif

%prep
%autosetup -n %{sname}-{{ 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}/manila_tempest_plugin
%{python2_sitelib}/*.egg-info

%if 0%{?with_doc}
%files doc
%doc doc/build/html
%license LICENSE
%endif

%changelog