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

# spec file for package python-os-apply-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-apply-config
%bcond_with test
%bcond_with docs
Name:           python-os-apply-config
Version:        9.1.2
Release:        0
Summary:        OpenStack os-apply-config Configuration Library
License:        Apache-2.0
Group:          Development/Languages/Python
URL:  {sname}
BuildRequires:  openstack-macros
BuildRequires:  python-devel
BuildRequires:  python-pbr
BuildRequires:  python-setuptools
Requires:       python-PyYAML
Requires:       python-anyjson
Requires:       python-pbr
Requires:       python-pystache
Requires:       python-setuptools
Requires:       python-six
BuildArch:      noarch
%if %{with test}
BuildRequires:  python-fixtures
BuildRequires:  python-mock
BuildRequires:  python-python-subunit
BuildRequires:  python-stestr
BuildRequires:  python-testscenarios
BuildRequires:  python-testtools

os-apply-config is a apply configuration from cloud metadata

%package doc
Summary:        Documentation for OpenStack Os-apply-config configuration library
Group:          Development/Languages/Python
BuildRequires:  python-Sphinx
BuildRequires:  python-oslosphinx
BuildRequires:  python-reno

%description doc
Documentation for the os-apply-config library.

%autosetup -n %{sname}-%{version}


%if %{with docs}
# generate html docs
%{__python2} build_sphinx
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

install -d -m 755 %{buildroot}%{_libexecdir}/os-apply-config/templates

%if %{with test}
%{__python2} -m stestr.cli run

%license LICENSE
%doc README.rst
%dir %{_libexecdir}/os-apply-config
%dir %{_libexecdir}/os-apply-config/templates

%if %{with docs}
%files doc
%doc doc/build/html
%license LICENSE

openSUSE Build Service is sponsored by