74 lines
2.1 KiB
Django/Jinja
74 lines
2.1 KiB
Django/Jinja
{% set pypi_name = 'python-oneviewclient' %}
|
|
{% set upstream_version = upstream_version('2.6.6') %}
|
|
{% set rpm_release = '1' %}
|
|
{% set source = url_pypi() %}
|
|
|
|
Name: {{ py2name() }}
|
|
Version: {{ py2rpmversion() }}
|
|
Release: {{ py2rpmrelease() }}
|
|
Summary: Python API and CLI for OpenStack Oneview
|
|
License: {{ license('Apache-2.0') }}
|
|
Group: Development/Languages/Python
|
|
URL: https://docs.openstack.org/{{ pypi_name }}
|
|
Source0: {{ source }}
|
|
# https://review.opendev.org/687019
|
|
Patch0: 0001-Switch-from-oslosphinx-to-openstackdocstheme.patch
|
|
BuildRequires: openstack-macros
|
|
BuildRequires: {{ py3('oslo.serialization') }}
|
|
BuildRequires: {{ py3('pbr') }}
|
|
BuildRequires: {{ py3('python-subunit') }}
|
|
BuildRequires: {{ py3('retrying') }}
|
|
BuildRequires: {{ py3('testrepository') }}
|
|
BuildRequires: {{ py3('testscenarios') }}
|
|
BuildRequires: {{ py3('testtools') }}
|
|
Requires: {{ py3('Babel') }}
|
|
Requires: {{ py3('pbr') }}
|
|
Requires: {{ py3('retrying') }}
|
|
Requires: {{ py3('six') }}
|
|
Requires: {{ py3('stevedore') }}
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
Client library for Oneview built on the Oneview API. It provides a Python API
|
|
(the oneviewclient module) and a command-line tool (oneview).
|
|
|
|
%package doc
|
|
Summary: Documentation for OpenStack Oneview API client libary
|
|
Group: Documentation/HTML
|
|
BuildRequires: {{ py3('Sphinx') }}
|
|
BuildRequires: {{ py3('openstackdocstheme') }}
|
|
|
|
%description doc
|
|
Client library for Oneview built on the Oneview API. It provides a Python API
|
|
(the oneviewclient module) and a command-line tool (oneview).
|
|
This package contains the documentation.
|
|
|
|
%prep
|
|
%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }}
|
|
%py_req_cleanup
|
|
|
|
%build
|
|
%py3_build
|
|
|
|
# Build HTML docs and man page
|
|
PBR_VERSION=%{version} %sphinx_build -b html doc/source doc/build/html
|
|
rm -rf doc/build/html/.{doctrees,buildinfo}
|
|
|
|
%install
|
|
%py3_install
|
|
|
|
%check
|
|
PYTHON=%{__python3} %{__python3} setup.py test
|
|
|
|
%files
|
|
%doc README.rst
|
|
%license LICENSE
|
|
%{python3_sitelib}/oneview_client
|
|
%{python3_sitelib}/*.egg-info
|
|
|
|
%files doc
|
|
%doc doc/build/html
|
|
%license LICENSE
|
|
|
|
%changelog
|