%global sname python-cinderclient Name: {{ py2name('python-cinderclient') }} Version: 3.1.1 Release: 0 Summary: Python API and CLI for OpenStack Cinder License: {{ 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 # https://review.openstack.org/#/c/488924/ Patch1: 0001-Fix-man-page-build.patch BuildRequires: openstack-macros BuildRequires: {{ py2pkg('PrettyTable') }} BuildRequires: {{ py2pkg('ddt') }} BuildRequires: {{ py2pkg('devel') }} BuildRequires: {{ py2pkg('fixtures') }} BuildRequires: {{ py2pkg('keystoneauth1') }} BuildRequires: {{ py2pkg('mock') }} BuildRequires: {{ py2pkg('os-testr') }} BuildRequires: {{ py2pkg('oslo.serialization') }} BuildRequires: {{ py2pkg('oslo.utils') }} BuildRequires: {{ py2pkg('pbr') }} BuildRequires: {{ py2pkg('python-subunit') }} BuildRequires: {{ py2pkg('requests') }} BuildRequires: {{ py2pkg('requests-mock') }} BuildRequires: {{ py2pkg('testrepository') }} BuildRequires: {{ py2pkg('testscenarios') }} BuildRequires: {{ py2pkg('testtools') }} Requires: {{ py2pkg('Babel') }} Requires: {{ py2pkg('PrettyTable') }} Requires: {{ py2pkg('keystoneauth1') }} Requires: {{ py2pkg('oslo.i18n') }} Requires: {{ py2pkg('oslo.utils') }} Requires: {{ py2pkg('requests') }} Requires: {{ py2pkg('simplejson') }} Requires: {{ py2pkg('six') }} BuildArch: noarch %description This is a client for the OpenStack Cinder API (Block Storage. There's a Python API (the cinderclient module), and a command-line script (cinder). Each implements 100% of the OpenStack Cinder API. %package doc Summary: Documentation for OpenStack Cinder API Client Group: Documentation/HTML BuildRequires: {{ py2pkg('Sphinx') }} BuildRequires: {{ py2pkg('openstackdocstheme') }} BuildRequires: {{ py2pkg('reno') }} %description doc This is a client for the OpenStack Cinder API (Block Storage. There's a Python API (the cinderclient module), and a command-line script (cinder). Each implements 100% of the OpenStack Cinder API. 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 --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/cinder.1 %{buildroot}%{_mandir}/man1/cinder.1 # bash completion install -p -D -m 644 tools/cinder.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/cinder.bash_completion %check rm cinderclient/tests/unit/test_shell.py %{__python2} setup.py testr %files %license LICENSE %doc README.rst ChangeLog %{python2_sitelib}/cinderclient %{python2_sitelib}/*.egg-info %{_bindir}/cinder %{_mandir}/man1/cinder.1* %{_sysconfdir}/bash_completion.d/cinder.bash_completion %files doc %license LICENSE %doc doc/build/html %changelog