{% set pypi_name = 'python-novaclient' %} {% set upstream_version = upstream_version('9.1.1') %} {% set rpm_release = '1' %} {% set source = url_pypi() %} Name: {{ py2name() }} Version: {{ py2rpmversion() }} Release: {{ py2rpmrelease() }} Epoch: {{ epoch('python-novaclient') }} Summary: Python API and CLI for OpenStack Nova License: {{ license('Apache-2.0') }} Group: Development/Languages/Python Source0: {{ source }} BuildRequires: openssl BuildRequires: openstack-macros BuildRequires: {{ py2pkg('devel', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('python-cinderclient', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('fixtures', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('python-glanceclient', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('python-keystoneclient', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('mock', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('os-client-config', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('osprofiler', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('pbr', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('requests-mock', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('setuptools', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('testrepository', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('testscenarios', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('testtools', py_versions=['py2', 'py3']) }} Requires: openssl Requires: {{ py2pkg('Babel') }} Requires: {{ py2pkg('PrettyTable') }} Requires: {{ py2pkg('iso8601') }} Requires: {{ py2pkg('keystoneauth1') }} Requires: {{ py2pkg('oslo.i18n') }} Requires: {{ py2pkg('oslo.serialization') }} Requires: {{ py2pkg('oslo.utils') }} Requires: {{ py2pkg('pbr') }} Requires: {{ py2pkg('simplejson') }} Requires: {{ py2pkg('six') }} BuildArch: noarch %if 0%{?suse_version} Requires(post): update-alternatives Requires(postun): update-alternatives %else # on RDO, update-alternatives is in chkconfig Requires(post): chkconfig Requires(postun): chkconfig %endif %python_subpackages %description This is a client for the OpenStack Nova API. There's a Python API (the novaclient module), and a command-line script (nova). Each implements 100% of the OpenStack Nova API. %package -n python-novaclient-doc Summary: Documentation for OpenStack Nova API Client Group: Documentation/HTML BuildRequires: {{ py2pkg('Sphinx') }} BuildRequires: {{ py2pkg('openstackdocstheme') }} BuildRequires: {{ py2pkg('reno') }} %description -n python-novaclient-doc This is a client for the OpenStack Nova API. There's a Python API (the novaclient module), and a command-line script (nova). Each implements 100% of the OpenStack Nova API. This package contains auto-generated documentation. %prep %autosetup -p1 -n %{name}-%{version} %py_req_cleanup sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg %build %{python_build} %{__python2} setup.py build_sphinx # Fix hidden-file-or-dir warnings rm -fr html/.doctrees html/.buildinfo %install %{python_install} %python_clone -a %{buildroot}%{_bindir}/nova %post %python_install_alternative nova %postun %python_uninstall_alternative nova %check %{python_expand rm -rf .testrepository export OS_TEST_PATH=novaclient/tests/unit $python setup.py testr } %files %{python_files} %license LICENSE %python_alternative %{_bindir}/nova %{python_sitelib}/novaclient %{python_sitelib}/*.egg-info %files -n python-novaclient-doc %doc README.rst doc/build/html %license LICENSE %changelog