rpm-packaging/openstack/python-congressclient/python-congressclient.spec.j2

96 lines
3.0 KiB
Django/Jinja

{% set pypi_name = 'python-congressclient' %}
{% set upstream_version = upstream_version('2.0.1') %}
{% set rpm_release = '1' %}
{% set source = url_pypi() %}
Name: {{ py2name() }}
Version: {{ py2rpmversion() }}
Release: {{ py2rpmrelease() }}
Summary: Client library for Congress
License: {{ license('Apache-2.0') }}
Group: Development/Languages/Python
URL: https://launchpad.net/{{ pypi_name }}
Source0: {{ source }}
BuildRequires: openstack-macros
BuildRequires: {{ py3('fixtures') }}
BuildRequires: {{ py3('mock') }}
BuildRequires: {{ py3('osc-lib') }}
BuildRequires: {{ py3('oslo.log') }}
BuildRequires: {{ py3('oslo.serialization') }}
BuildRequires: {{ py3('oslotest') }}
BuildRequires: {{ py3('pbr') }}
BuildRequires: {{ py3('requests-mock') }}
BuildRequires: {{ py3('sphinxcontrib-apidoc') }}
BuildRequires: {{ py3('stestr') }}
BuildArch: noarch
%description
This package is client for Congress component.
Congress is an open policy framework for the cloud.
Congress fetches information about VMs from Nova,
and network state from Neutron, etc. Congress then
feeds input data from those services into its policy
engine where Congress verifies that the cloud's actual
state abides by the cloud operator's policies. Congress
is designed to work with any policy and any cloud service.
%package -n {{ py2name(py_versions='py3') }}
Summary: Client library for OpenStack Congress
Requires: {{ py3('Babel') }}
Requires: {{ py3('cliff') }}
Requires: {{ py3('keystoneauth1') }}
Requires: {{ py3('oslo.i18n') }}
Requires: {{ py3('oslo.log') }}
Requires: {{ py3('oslo.serialization') }}
Requires: {{ py3('pbr') }}
Requires: {{ py3('requests') }}
Requires: {{ py3('six') }}
%description -n {{ py2name(py_versions='py3') }}
Client library for interacting with Openstack Congress API.
%package doc
Summary: Documentation for OpenStack Congress API client libary
Group: Documentation/HTML
BuildRequires: {{ py3('Sphinx') }}
BuildRequires: {{ py3('openstackdocstheme') }}
%description doc
This package is client for Congress component.
Congress is an open policy framework for the cloud.
Congress fetches information about VMs from Nova,
and network state from Neutron, etc. Congress then
feeds input data from those services into its policy
engine where Congress verifies that the cloud's actual
state abides by the cloud operator's policies. Congress
is designed to work with any policy and any cloud service.
This package contains the documentation.
%prep
%autosetup -p1 -n {{ pypi_name }}-%{version}
%py_req_cleanup
%build
%{py3_build}
# Build HTML docs and man page
PBR_VERSION={{ upstream_version }} %sphinx_build -b html doc/source doc/build/html
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
%{py3_install}
%check
%{__python3} -m stestr.cli run
%files -n {{ py2name(py_versions='py3') }}
%doc README.rst
%license LICENSE
%{python3_sitelib}/congressclient
%{python3_sitelib}/*.egg-info
%files doc
%doc doc/build/html
%license LICENSE
%changelog