File python-glareclient.spec of Package python-glareclient

#
# spec file for package python3-glareclient
#
# Copyright (c) 2023 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/
#


%global with_doc 0
Name:           python3-glareclient
Version:        0.5.3
Release:        0
Epoch:          0
Summary:        Python API and CLI for OpenStack Glare
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/python-glareclient
Source0:        https://files.pythonhosted.org/packages/source/p/python-glareclient/python-glareclient-0.5.3.tar.gz
Patch1:         0001-python3-compatibility-for-failing-unit-tests.patch
BuildRequires:  openstack-macros
BuildRequires:  python3-PyYAML
BuildRequires:  python3-coverage
BuildRequires:  python3-fixtures
BuildRequires:  python3-mock
BuildRequires:  python3-os-client-config
BuildRequires:  python3-osc-lib
BuildRequires:  python3-oslo.log
BuildRequires:  python3-oslo.utils
BuildRequires:  python3-reno
BuildRequires:  python3-requests-mock
BuildRequires:  python3-testrepository
BuildRequires:  python3-testscenarios
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-six
BuildArch:      noarch

%description
Python bindings to the Glare Artifact Repository

%if 0%{?with_doc}
%package doc
Summary:        Documentation for OpenStack Glare API Client
Group:          Documentation/HTML
BuildRequires:  python3-Sphinx
BuildRequires:  python3-openstackdocstheme

%description      doc
Python bindings to the Glare Artifact Repository
This package contains auto-generated documentation.
%endif

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

%build
%py3_build

%if 0%{?with_doc}
## generate html docs
#PYTHONPATH=. PBR_VERSION=0.5.3 %sphinx_build -b html doc/source doc/build/html
## remove the sphinx-build leftovers
#rm -rf doc/build/html/.{doctrees,buildinfo}
%endif

%install
%py3_install

%check
PYTHON=%{__python3} PYTHONPATH=. %{__python3} setup.py testr

%files
%license LICENSE
%doc README.rst ChangeLog
%{_bindir}/glare
%{python3_sitelib}/glareclient
%{python3_sitelib}/*.egg-info

%if 0%{?with_doc}
%files doc
%license LICENSE
%doc doc/build/html
%endif

%changelog
openSUSE Build Service is sponsored by