File python-metalsmith.spec of Package python-metalsmith

#
# spec file for package python-metalsmith
#
# Copyright (c) 2020 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/
#


Name:           python-metalsmith
Version:        0.15.0
Release:        0
Summary:        Bare metal provisioner using Ironic
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/metalsmith
Source0:        https://files.pythonhosted.org/packages/source/m/metalsmith/metalsmith-0.15.0.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python3-PrettyTable
BuildRequires:  python3-mock
BuildRequires:  python3-openstacksdk
BuildRequires:  python3-pbr
BuildRequires:  python3-setuptools
BuildRequires:  python3-six
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
Group:          Development/Languages/Python
Requires:       python3-PrettyTable
Requires:       python3-openstacksdk
Requires:       python3-pbr
Requires:       python3-requests
Requires:       python3-six

%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-sphinxcontrib-apidoc

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

%package -n ansible-role-python-metalsmith-deployment
Summary:        Ansible role for Metalsmith deployment
Group:          Development/Languages/Python
Requires:       ansible
Requires:       python3-metalsmith

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

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

%build
%{py3_build}

# generate html docs
PBR_VERSION=0.15.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
python3 -m stestr.cli 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 roles/metalsmith_deployment/README.rst
%{_datadir}/ansible
%{_datadir}/ansible/roles
%{_datadir}/ansible/roles/metalsmith_deployment
%exclude %{_datadir}/ansible/roles/metalsmith_deployment/README.rst

%changelog