File python-monasca-tempest-plugin.spec of Package python-monasca-tempest-plugin

#
# spec file for package python-monasca-tempest-plugin
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%global sname monasca_tempest_plugin
%global with_doc 0
%global common_desc \
This package contains Tempest tests to cover the monasca project. \
Additionally it provides a plugin to automatically load these tests into Tempest.
Name:           python-monasca-tempest-plugin
Version:        0.3.0
Release:        0
Summary:        Tempest plugin for the monasca project
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://git.openstack.org/cgit/openstack/monasca-tempest-plugin
Source0:        monasca-tempest-plugin-0.3.0.tar.gz
# https://review.openstack.org/#/c/634386/
Patch1:         0001-Recognize-config-options-from-service_available.patch
# https://review.opendev.org/663927
Patch2:         0001-Use-unicode-literals-in-test_metrics.patch
BuildRequires:  openstack-macros
BuildRequires:  python-devel
BuildRequires:  python-pbr
BuildRequires:  python-setuptools
Requires:       openstack-tempest
Requires:       python-mock
Requires:       python-monasca-common
Requires:       python-oslo.config
Requires:       python-oslo.serialization
Requires:       python-oslo.utils
Requires:       python-oslotest
Requires:       python-pbr
Requires:       python-six
BuildArch:      noarch

%description
%{common_desc}

%if 0%{?with_doc}
%package doc
Summary:        Documentation for monasca tempest plugin
Group:          Development/Languages/Python
BuildRequires:  python-Sphinx
BuildRequires:  python-oslosphinx

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

%prep
%autosetup -p1 -n monasca-tempest-plugin-0.3.0

# 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}/monasca_tempest_tests
%{python2_sitelib}/*.egg-info

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

%changelog