File python-tripleoclient.spec of Package python-tripleoclient

#
# spec file for package python-tripleoclient
#
# 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 https://bugs.opensuse.org/
#


%if 0%{?rhel} || 0%{?fedora}
%global rdo 1
%endif
Name:           python-tripleoclient
Version:        13.7.0
Release:        0
Summary:        OpenstackClient plugin for tripleoclient
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/python-tripleoclient
Source0:        https://files.pythonhosted.org/packages/source/p/python-tripleoclient/python-tripleoclient-13.7.0.tar.gz
# Patch added due to SUSE CI error due to PEP3151 must be removed
# when https://review.opendev.org/#/c/756720/ will be released
Patch0:         0001-catch-KeyError-and-OSError-PEP3151.patch
BuildRequires:  ansible-runner
BuildRequires:  openstack-macros
BuildRequires:  openstack-tripleo-common
BuildRequires:  python3-cliff
BuildRequires:  python3-cryptography
BuildRequires:  python3-devel
BuildRequires:  python3-fixtures
BuildRequires:  python3-heatclient
BuildRequires:  python3-ironic-inspector-client
BuildRequires:  python3-ironicclient
BuildRequires:  python3-mock
BuildRequires:  python3-openstackclient
BuildRequires:  python3-oslo.concurrency
BuildRequires:  python3-passlib
BuildRequires:  python3-psutil
BuildRequires:  python3-requests-mock
BuildRequires:  python3-stestr
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
BuildRequires:  python3-validations-libs
BuildRequires:  python3-zaqarclient
BuildArch:      noarch
%if 0%{?rdo}
BuildRequires:  hostname
%endif

%description
python-tripleoclient is a Python plugin to OpenstackClient
for TripleO.

%package -n python3-tripleoclient
Summary:        OpenstackClient plugin for tripleoclient
Group:          Development/Languages/Python
Requires:       ansible-runner
Requires:       openstack-tripleo-common
Requires:       python3-cliff
Requires:       python3-cryptography
Requires:       python3-heatclient
Requires:       python3-ironic-inspector-client
Requires:       python3-ironicclient
Requires:       python3-mistralclient
Requires:       python3-openstackclient
Requires:       python3-osc-lib
Requires:       python3-oslo.concurrency
Requires:       python3-passlib
Requires:       python3-pbr
Requires:       python3-psutil
Requires:       python3-simplejson
Requires:       python3-six
Requires:       python3-validations-libs
Requires:       python3-websocket-client
Requires:       python3-zaqarclient

%description -n python3-tripleoclient
python-tripleoclient is a Python plugin to OpenstackClient
for TripleO.

This package contains the Python 3.x module.

%package doc
Summary:        Documentation for OpenstackClient plugin for tripleoclient
Group:          Documentation/HTML
BuildRequires:  python3-Sphinx
BuildRequires:  python3-openstackdocstheme
BuildRequires:  python3-sphinxcontrib-svg2pdfconverter

%description      doc
python-tripleoclient is a Python plugin to OpenstackClient
for TripleO.
This package contains auto-generated documentation.

%prep
%autosetup -p1 -n python-tripleoclient-%{version}
%py_req_cleanup

%build
%{py3_build}

PYTHONPATH=. %sphinx_build -b html doc/source doc/build/html
PYTHONPATH=. %sphinx_build -b man doc/source doc/build/man
# remove the Sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
%{py3_install}
# man page
install -p -D -m 644 doc/build/man/python-tripleoclient.1 %{buildroot}%{_mandir}/man1/python-tripleoclient.1

%check
%{__python3} -m stestr.cli run

%files
%doc README.rst
%license LICENSE
%{python3_sitelib}/tripleoclient
%{python3_sitelib}/*.egg-info
%{_mandir}/man1/python-tripleoclient.1.gz

%files doc
%license LICENSE
%doc doc/build/html

%changelog