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

#
# spec file for package python-os-collect-config
#
# Copyright (c) 2025 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 https://bugs.opensuse.org/
#


Name:           python3-os-collect-config
Version:        14.0.0
Release:        0
Epoch:          0
Summary:        Collect and cache metadata running hooks on changes
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://docs.openstack.org/os-collect-config
Source0:        https://files.pythonhosted.org/packages/source/o/os-collect-config/os-collect-config-14.0.0.tar.gz
Source1:        os-collect-config.service
Source2:        os-collect-config.conf
BuildRequires:  openstack-macros
BuildRequires:  python3-fixtures
BuildRequires:  python3-heatclient
BuildRequires:  python3-keystoneclient
BuildRequires:  python3-lxml
BuildRequires:  python3-oslo.config
BuildRequires:  python3-oslo.log
BuildRequires:  python3-pbr
BuildRequires:  python3-stestr
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
BuildRequires:  python3-zaqarclient
Requires:       python3-anyjson
Requires:       python3-dogpile.cache
Requires:       python3-eventlet
Requires:       python3-heatclient
Requires:       python3-iso8601
Requires:       python3-keystoneclient
Requires:       python3-lxml
Requires:       python3-oslo.config
Requires:       python3-oslo.log
Requires:       python3-pbr
Requires:       python3-requests
Requires:       python3-six
Requires:       python3-zaqarclient
BuildArch:      noarch
%if 0%{?suse_version}
BuildRequires:  systemd-rpm-macros
%{?systemd_requires}
%else
BuildRequires:  systemd
Requires(post): systemd
Requires(postun): systemd
Requires(preun): systemd
%endif

%description
Service to collect openstack heat metadata.

%prep
%autosetup -p1 -n os-collect-config-14.0.0
%py_req_cleanup

%build
%{py3_build}

%install
%{py3_install}
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

%check
%{openstack_stestr_run}

%post
%systemd_post os-collect-config.service

%preun
%systemd_preun os-collect-config.service

%postun
%systemd_postun_with_restart os-collect-config.service

%files
%license LICENSE
%doc README.rst
%{_bindir}/os-collect-config
%config(noreplace) %attr(-, root, root) %{_sysconfdir}/os-collect-config.conf
%{python3_sitelib}/os_collect_config
%{python3_sitelib}/*.egg-info
%{_unitdir}/os-collect-config.service
%{_localstatedir}/lib/%{name}

%changelog
openSUSE Build Service is sponsored by