File python-os-collect-config.spec of Package python-os-collect-config

# spec file for package python-os-collect-config
# Copyright (c) 2020 SUSE LLC
# 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

%global sname os-collect-config
Name:           python-os-collect-config
Version:        9.2.1
Release:        0
Summary:        Collect and cache metadata running hooks on changes
License:        Apache-2.0
Group:          Development/Languages/Python
URL:  {sname}
Source1:        os-collect-config.service
Source2:        os-collect-config.conf
BuildRequires:  openstack-macros
BuildRequires:  python-devel
BuildRequires:  python-fixtures
BuildRequires:  python-heatclient
BuildRequires:  python-keystoneclient
BuildRequires:  python-lxml
BuildRequires:  python-mock
BuildRequires:  python-oslo.config
BuildRequires:  python-oslo.log
BuildRequires:  python-pbr
BuildRequires:  python-setuptools
BuildRequires:  python-stestr
BuildRequires:  python-testscenarios
BuildRequires:  python-testtools
BuildRequires:  python-zaqarclient
Requires:       python-anyjson
Requires:       python-dogpile.cache
Requires:       python-eventlet
Requires:       python-heatclient
Requires:       python-iso8601
Requires:       python-keystoneclient
Requires:       python-lxml
Requires:       python-os-refresh-config
Requires:       python-oslo.config
Requires:       python-oslo.log
Requires:       python-pbr
Requires:       python-requests
Requires:       python-six
Requires:       python-zaqarclient
BuildArch:      noarch
%if 0%{?suse_version}
BuildRequires:  systemd-rpm-macros
BuildRequires:  systemd
Requires(post): systemd
Requires(postun): systemd
Requires(preun): systemd

Service to collect openstack heat metadata.

%autosetup -n %{sname}-%{version}
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg


install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/os-collect-config.service
install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/os-collect-config.conf
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/local-data

%{__python2} -m stestr.cli run

%systemd_post os-collect-config.service

%systemd_preun os-collect-config.service

%systemd_postun_with_restart os-collect-config.service

%license LICENSE
%doc README.rst
%config(noreplace) %attr(-, root, root) %{_sysconfdir}/os-collect-config.conf

openSUSE Build Service is sponsored by