{% set pypi_name = 'python-cinderclient' %} {% set upstream_version = upstream_version('9.4.0') %} {% set rpm_release = '1' %} {% set source = url_pypi() %} Name: {{ py2name() }} Version: {{ py2rpmversion() }} Release: {{ py2rpmrelease() }} Summary: Python API and CLI for OpenStack Cinder License: {{ license('Apache-2.0')}} Group: Development/Languages/Python URL: https://docs.openstack.org/{{ pypi_name }} Source0: {{ source }} BuildRequires: openstack-macros BuildRequires: {{ py3('PrettyTable') }} BuildRequires: {{ py3('ddt') }} BuildRequires: {{ py3('fixtures') }} BuildRequires: {{ py3('keystoneauth1') }} BuildRequires: {{ py3('oslo.serialization') }} BuildRequires: {{ py3('oslo.utils') }} BuildRequires: {{ py3('pbr') }} BuildRequires: {{ py3('requests') }} BuildRequires: {{ py3('requests-mock') }} BuildRequires: {{ py3('stestr') }} BuildRequires: {{ py3('testtools') }} 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 -n {{ py2name(py_versions='py3') }} Summary: Python API and CLI for OpenStack Cinder Requires: {{ py3('Babel') }} Requires: {{ py3('PrettyTable') }} Requires: {{ py3('keystoneauth1') }} Requires: {{ py3('oslo.i18n') }} Requires: {{ py3('oslo.utils') }} Requires: {{ py3('requests') }} %if 0%{?suse_version} Obsoletes: {{ py2name(py_versions='py2') }} < 6.0.0 %endif %description -n {{ py2name(py_versions='py3') }} 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 the Python 3.x module. %package -n python-cinderclient-doc Summary: Documentation for OpenStack Cinder API Client Group: Documentation/HTML BuildRequires: {{ py3('Sphinx') }} BuildRequires: {{ py3('openstackdocstheme') }} BuildRequires: {{ py3('reno') }} %description -n python-cinderclient-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 {{ pypi_name }}-{{ upstream_version }} %py_req_cleanup %build %{py3_build} export PYTHONPATH=. PBR_VERSION={{ upstream_version }} %sphinx_build -b html doc/source doc/build/html PBR_VERSION={{ upstream_version }} %sphinx_build -b man doc/source doc/build/man # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} %install %{py3_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 %{openstack_stestr_run} %files -n {{ py2name(py_versions='py3') }} %license LICENSE %doc README.rst ChangeLog %{python3_sitelib}/cinderclient %{python3_sitelib}/*.egg-info %{_bindir}/cinder %{_mandir}/man1/cinder.1* %{_sysconfdir}/bash_completion.d/cinder.bash_completion %files -n python-cinderclient-doc %license LICENSE %doc doc/build/html %changelog