File python-metalsmith.spec of Package python-metalsmith

#
# spec file for package python-metalsmith
#
# Copyright (c) 2024 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:           python-metalsmith
Version:        2.3.0
Release:        0
Summary:        Bare metal provisioner using Ironic
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://docs.openstack.org/metalsmith
Source0:        https://files.pythonhosted.org/packages/source/m/metalsmith/metalsmith-2.3.0.tar.gz
BuildRequires:  ansible
BuildRequires:  openstack-macros
BuildRequires:  python3-PrettyTable
BuildRequires:  python3-openstacksdk
BuildRequires:  python3-pbr
BuildRequires:  python3-stestr
BuildRequires:  python3-testtools
BuildArch:      noarch

%description
Simple Python library and CLI tool to provision bare metal machines using
OpenStack Ironic.

%package -n python3-metalsmith
Summary:        Bare metal provisioner using Ironic
Requires:       ansible
Requires:       python3-PrettyTable
Requires:       python3-openstacksdk
Requires:       python3-pbr
Requires:       python3-requests

%description -n python3-metalsmith
Simple Python library and CLI tool to provision bare metal machines using
OpenStack Ironic.

%package -n python-metalsmith-doc
Summary:        Documentation for Metalsmith
Group:          Documentation/HTML
BuildRequires:  python3-Sphinx
BuildRequires:  python3-openstackdocstheme
BuildRequires:  python3-sphinxcontrib-apidoc
BuildRequires:  python3-sphinxcontrib-svg2pdfconverter

%description -n python-metalsmith-doc
Documentation for Metalsmith

%package -n ansible-role-python-metalsmith-deployment
Summary:        Ansible role for Metalsmith deployment
Requires:       python3-metalsmith

%description -n ansible-role-python-metalsmith-deployment
Ansible role for Metalsmith deployment

%prep
%autosetup -p1 -n metalsmith-2.3.0
%py_req_cleanup

%build
%{py3_build}

# generate html docs
PBR_VERSION=2.3.0 %sphinx_build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
%{py3_install}

%check
%{openstack_stestr_run}

%files -n python3-metalsmith
%license LICENSE
%{_bindir}/metalsmith
%{python3_sitelib}/metalsmith
%{python3_sitelib}/*.egg-info

%files -n python-metalsmith-doc
%license LICENSE
%doc doc/build/html README.rst

%files -n ansible-role-python-metalsmith-deployment
%license LICENSE
%doc metalsmith_ansible/roles/metalsmith_deployment/README.rst
%{_datadir}/ansible
%{_datadir}/ansible/roles
%{_datadir}/ansible/roles/metalsmith_deployment
%exclude %{_datadir}/ansible/roles/metalsmith_deployment/README.rst

%changelog
openSUSE Build Service is sponsored by