File python-manilaclient.spec of Package python-manilaclient
#
# spec file for package python-manilaclient
#
# 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/
#
%global sname python-manilaclient
Name: python-manilaclient
Version: 1.17.4
Release: 0
Summary: Client Library for OpenStack Share API
License: Apache-2.0
Group: Development/Languages/Python
URL: https://launchpad.net/%{sname}
Source0: https://files.pythonhosted.org/packages/source/p/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros
BuildRequires: openstack-tempest
BuildRequires: python-ddt
BuildRequires: python-devel
BuildRequires: python-fixtures
BuildRequires: python-mock
BuildRequires: python-openstackclient
BuildRequires: python-oslotest
BuildRequires: python-testrepository
BuildRequires: python-testtools
Requires: python-Babel
Requires: python-PrettyTable
Requires: python-keystoneclient
Requires: python-oslo.config
Requires: python-oslo.log
Requires: python-oslo.serialization
Requires: python-oslo.utils
Requires: python-requests
Requires: python-simplejson
Requires: python-six
BuildArch: noarch
%description
Client library and command line utility for interacting with Openstack
Share API.
%package doc
Summary: Documentation for OpenStack Share API Client
Group: Documentation/HTML
BuildRequires: python-Sphinx
BuildRequires: python-openstackdocstheme
%description doc
Client library and command line utility for interacting with Openstack
Share API.
This package contains auto-generated documentation.
%package test
Summary: Testsuite for OpenStack Share API Client
Group: Development/Languages/Python
Requires: %{name} = %{version}
Requires: openstack-tempest
Requires: python-ddt
Requires: python-fixtures
Requires: python-mock
Requires: python-openstackclient
Requires: python-oslotest
Requires: python-testrepository
Requires: python-testtools
%description test
Client library and command line utility for interacting with Openstack
Share API.
This package contains the testsuite.
%prep
%autosetup -n %{sname}-%{version}
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg
%build
%{py2_build}
%{__python2} setup.py build_sphinx --builder=html,man
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
%{py2_install}
# man page
install -p -D -m 644 doc/build/man/python-manilaclient.1 %{buildroot}%{_mandir}/man1/python-manilaclient.1
# bash completion
install -p -D -m 644 tools/manila.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/%{name}
# handle the test subpackage
%openstack_test_package_install manilaclient
%check
%{__python2} setup.py testr
%files
%doc README.rst
%license LICENSE
%{python2_sitelib}/manilaclient
%{python2_sitelib}/*.egg-info
%{_sysconfdir}/bash_completion.d/%{name}
%{_mandir}/man1/python-manilaclient.1.gz
%{_bindir}/manila
%files doc
%license LICENSE
%doc doc/build/html
%files test
%license LICENSE
%openstack_test_package_dir
%changelog