File python-ovsdbapp.spec of Package python-ovsdbapp

#
# spec file for package python-ovsdbapp
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%define with_tests 0
Name:           python-ovsdbapp
Version:        0.12.3
Release:        0
Summary:        A library for creating OVSDB applications
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/ovsdbapp
Source0:        https://files.pythonhosted.org/packages/source/o/ovsdbapp/ovsdbapp-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-devel
BuildRequires:  python-fixtures >= 3.0.0
BuildRequires:  python-os-testr
BuildRequires:  python-oslotest
BuildRequires:  python-ovs >= 2.8.0
BuildRequires:  python-pbr >= 2.0.0
BuildRequires:  python-stestr
BuildRequires:  python-testscenarios
BuildRequires:  python-testtools
Requires:       python-fixtures >= 3.0.0
Requires:       python-ovs >= 2.8.0
Requires:       python-pbr >= 2.0.0
BuildArch:      noarch

%description
The ovdsbapp library is useful for creating applications that communicate via
Open_vSwitchs OVSDB protocol (https://tools.ietf.org/html/rfc7047). It wraps
the Python 'ovs' and adds an event loop and friendly transactions.

%package doc
Summary:        Documentation for OpenStack log library
Group:          Development/Languages/Python
BuildRequires:  python-Sphinx
BuildRequires:  python-openstackdocstheme

%description doc
Documentation for the ovsdbap library.

%prep
%autosetup -p1 -n ovsdbapp-%{version}
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg

%build
%{py2_build}

# generate html docs
%{__python2} setup.py build_sphinx
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
%{py2_install}

%if 0%{?with_tests}
%check
stestr run
%endif

%files
%license LICENSE
%doc ChangeLog README.rst
%{python2_sitelib}/ovsdbapp
%{python2_sitelib}/*.egg-info

%files doc
%license LICENSE
%doc doc/build/html

%changelog
openSUSE Build Service is sponsored by