File python-gnocchiclient.spec of Package python-gnocchiclient

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


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-gnocchiclient
Version:        7.0.6
Release:        0
Summary:        Python API and CLI for OpenStack Gnocchi
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://github.com/openstack/python-gnocchiclient
Source0:        https://pypi.io/packages/source/g/gnocchiclient/gnocchiclient-%{version}.tar.gz
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module pbr}
BuildRequires:  python-rpm-macros
Requires:       python-cliff >= 2.10.0
Requires:       python-debtcollector
Requires:       python-futurist
Requires:       python-iso8601
Requires:       python-keystoneauth1 >= 2.0.0
Requires:       python-monotonic
Requires:       python-osc-lib >= 1.7.0
Requires:       python-pbr >= 2.0.0
Requires:       python-python-dateutil
Requires:       python-six >= 1.9.0
Requires:       python-ujson
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch:      noarch

%python_subpackages

%description
This is a client library for Gnocchi built on the Gnocchi API. It
provides a Python API (the gnocchiclient module) and a command-line tool.

%prep
%autosetup -n gnocchiclient-%{version}

%build
%python_build

%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/gnocchi

%post
%python_install_alternative gnocchi

%postun
%python_uninstall_alternative gnocchi

%files %{python_files}
%doc README.rst
%license LICENSE
%python_alternative %{_bindir}/gnocchi
%{python_sitelib}/gnocchiclient
%{python_sitelib}/*.egg-info

%changelog
openSUSE Build Service is sponsored by