File python-group-based-policy-client.spec of Package python-group-based-policy-client

#
# spec file for package python-group-based-policy-client
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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-%{**}}
%define skip_python3 1
Name:           python-group-based-policy-client
Version:        3.0.0
Release:        0
Summary:        CLI and Client Library for Group Based Policy
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            http://www.openstack.org/
Source:         https://files.pythonhosted.org/packages/source/p/python-group-based-policy-client/python-group-based-policy-client-%{version}.tar.gz
BuildRequires:  %{python_module mock}
BuildRequires:  %{python_module pbr}
BuildRequires:  %{python_module testrepository}
BuildRequires:  python-heatclient
BuildRequires:  python-keystoneclient
BuildRequires:  python-mox3
BuildRequires:  python-neutronclient
BuildRequires:  python-oslotest
BuildRequires:  python-pbr >= 1.8
BuildRequires:  python-rpm-macros
Requires:       python-heatclient >= 1.6.1
Requires:       python-keystoneclient
Requires:       python-neutronclient >= 6.3.0
Requires:       python-oslo.serialization >= 1.10.0
Requires:       python-oslo.utils >= 3.20.0
BuildArch:      noarch

%python_subpackages

%description
This is the client API library for Group Based Policy.

%prep
%setup -q -n %{name}-%{version}

%build
%python_build

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

%check
# not working for rocky :(
%{python_expand rm -rf .testrepository
$python setup.py testr
}

%post
%python_install_alternative gbp

%postun
%python_uninstall_alternative bbp

%files %{python_files}
%{python_sitelib}/*
%python_alternative %{_bindir}/gbp

%changelog
openSUSE Build Service is sponsored by