File python-karborclient.spec of Package python-karborclient

#
# spec file for package python-karborclient
#
# 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-karborclient
Version:        2.1.0
Release:        0
Summary:        Python API and CLI for OpenStack Karbor
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/python-karborclient
Source0:        https://files.pythonhosted.org/packages/source/p/python-karborclient/python-karborclient-2.1.0.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python3-Babel
BuildRequires:  python3-PrettyTable
BuildRequires:  python3-fixtures
BuildRequires:  python3-keystoneauth1
BuildRequires:  python3-mock
BuildRequires:  python3-osc-lib
BuildRequires:  python3-oslo.i18n
BuildRequires:  python3-oslo.log
BuildRequires:  python3-oslo.utils
BuildRequires:  python3-oslotest
BuildRequires:  python3-pbr
BuildRequires:  python3-python-subunit
BuildRequires:  python3-requests
BuildRequires:  python3-requests-mock
BuildRequires:  python3-simplejson
BuildRequires:  python3-testrepository
BuildRequires:  python3-testtools
BuildArch:      noarch

%description
OpenStack Clustering service Provisioning API Client Library

This is a client for the OpenStack Karbor API. It provides a Python API (the
karborclient module) and a command-line interface (Karbor).

%package -n python3-karborclient
Summary:        Python API and CLI for OpenStack Karbor
Group:          Development/Languages/Python
Requires:       python3-Babel
Requires:       python3-PrettyTable
Requires:       python3-keystoneauth1
Requires:       python3-osc-lib
Requires:       python3-oslo.i18n
Requires:       python3-oslo.log
Requires:       python3-oslo.utils
Requires:       python3-pbr
Requires:       python3-requests
Requires:       python3-simplejson
Requires:       python3-six

%description -n python3-karborclient
OpenStack Clustering service Provisioning API Client Library

This package contains the Python 3.x module.

%package -n python-karborclient-doc
Summary:        Documentation for OpenStack Karbor API Client
Group:          Documentation/HTML
BuildRequires:  python3-Sphinx
BuildRequires:  python3-openstackdocstheme

%description -n python-karborclient-doc
This is a client for the OpenStack Karbor API and a command-line script (karbor).
Each implements 100% of the OpenStack Karbor API.
This package contains auto-generated documentation.

%prep
%autosetup -p1 -n python-karborclient-2.1.0
%py_req_cleanup

%build
%{py3_build}

%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
rm -rf .testrepository
export OS_TEST_PATH=karborclient/tests/unit
PYTHON=python3 python3 setup.py testr

%files -n python3-karborclient
%license LICENSE
%doc README.rst
%{_bindir}/karbor
%{python3_sitelib}/karborclient
%{python3_sitelib}/*.egg-info

%files -n python-karborclient-doc
%license LICENSE
%doc doc/build/html

%changelog