File python-oneviewclient.spec of Package python-oneviewclient

#
# spec file for package python-oneviewclient
#
# 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/
#


Name:           python-oneviewclient
Version:        2.6.6
Release:        0
Summary:        Python API and CLI for OpenStack Oneview
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/%{name}
Source0:        https://files.pythonhosted.org/packages/source/p/python-oneviewclient/python-oneviewclient-2.6.6.tar.gz
# https://review.opendev.org/687019
Patch0:         0001-Switch-from-oslosphinx-to-openstackdocstheme.patch
BuildRequires:  openstack-macros
BuildRequires:  python3-mock
BuildRequires:  python3-oslo.serialization
BuildRequires:  python3-pbr
BuildRequires:  python3-python-subunit
BuildRequires:  python3-retrying
BuildRequires:  python3-setuptools
BuildRequires:  python3-testrepository
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
Requires:       python3-Babel
Requires:       python3-pbr
Requires:       python3-retrying
Requires:       python3-six
Requires:       python3-stevedore
BuildArch:      noarch

%description
Client library for Oneview built on the Oneview API. It provides a Python API
(the oneviewclient module) and a command-line tool (oneview).

%package doc
Summary:        Documentation for OpenStack Oneview API client libary
Group:          Documentation/HTML
BuildRequires:  python3-Sphinx
BuildRequires:  python3-openstackdocstheme

%description doc
Client library for Oneview built on the Oneview API. It provides a Python API
(the oneviewclient module) and a command-line tool (oneview).
This package contains the documentation.

%prep
%autosetup -p1 -n python-oneviewclient-2.6.6
%py_req_cleanup

%build
%py3_build

# Build HTML docs and man page
PBR_VERSION=%{version} %sphinx_build -b html doc/source doc/build/html
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
%py3_install

%check
PYTHON=%{__python3} %{__python3} setup.py test

%files
%doc README.rst
%license LICENSE
%{python3_sitelib}/oneview_client
%{python3_sitelib}/*.egg-info

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

%changelog
openSUSE Build Service is sponsored by