File python-openstackclient.spec of Package python-openstackclient
#
# spec file for package python-openstackclient
#
# 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-openstackclient
Name: python-openstackclient
Version: 3.12.2
Release: 0
Summary: OpenStack Command-line Client
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: python-cinderclient
BuildRequires: python-cliff
BuildRequires: python-devel
BuildRequires: python-fixtures
BuildRequires: python-glanceclient
BuildRequires: python-keystoneclient
BuildRequires: python-mock
BuildRequires: python-novaclient
BuildRequires: python-openstacksdk
BuildRequires: python-os-client-config
BuildRequires: python-os-testr
BuildRequires: python-osc-lib
BuildRequires: python-oslotest
BuildRequires: python-osprofiler
BuildRequires: python-requests
BuildRequires: python-requests-mock
BuildRequires: python-stevedore
BuildRequires: python-testrepository
BuildRequires: python-testtools
BuildRequires: python-wrapt
Requires: python-Babel
Requires: python-cinderclient
Requires: python-cliff
Requires: python-glanceclient
Requires: python-keystoneauth1
Requires: python-keystoneclient
Requires: python-novaclient
Requires: python-openstacksdk
Requires: python-osc-lib
Requires: python-oslo.i18n
Requires: python-oslo.utils
Requires: python-six
BuildArch: noarch
%description
python-openstackclient is a unified command-line client for the OpenStack APIs.
It is a thin wrapper to the stock python-*client modules that implement the
actual REST API client actions.
%package doc
Summary: Documentation for OpenStack Command-line Client
# Some clients are commented out, since they have not been built yet
# TODO(jpena): uncomment them to enable their sections in the documentation
Group: Documentation/HTML
BuildRequires: python-Sphinx
#BuildRequires: python-aodhclient
#BuildRequires: python-barbicanclient
#BuildRequires: python-congressclient
#BuildRequires: python-designateclient
#BuildRequires: python-heatclient
#BuildRequires: python-ironicclient
#BuildRequires: python-mistralclient
#BuildRequires: python-muranoclient
#BuildRequires: python-neutronclient
BuildRequires: python-openstackdocstheme
#BuildRequires: python-ironic-inspector-client
#BuildRequires: python-saharaclient
#BuildRequires: python-zaqarclient
%description doc
python-openstackclient is a unified command-line client for the OpenStack APIs.
It is a thin wrapper to the stock python-*client modules that implement the
actual REST API client actions.
This package contains auto-generated documentation.
%prep
%autosetup -p1 -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 -b html
%{__python2} setup.py build_sphinx -b 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/openstack.1 %{buildroot}%{_mandir}/man1/openstack.1
%check
%{__python2} setup.py testr
%files
%doc README.rst
%license LICENSE
%{python2_sitelib}/openstackclient
%{python2_sitelib}/*.egg-info
%{_mandir}/man1/openstack.1.gz
%{_bindir}/openstack
%files doc
%license LICENSE
%doc doc/build/html
%changelog