File python-os-vif.spec of Package python-os-vif

#
# spec file for package python-os-vif
#
# Copyright (c) 2018 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 http://bugs.opensuse.org/
#


%global sname os_vif
Name:           python-os-vif
Version:        1.10.0
Release:        0
Summary:        A library for plugging and unplugging virtual interfaces in OpenStack
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            http://launchpad.net/os-vif
Source0:        https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-devel
BuildRequires:  python-netaddr >= 0.7.13
BuildRequires:  python-oslo.concurrency >= 3.8.0
BuildRequires:  python-oslo.config >= 4.0.0
BuildRequires:  python-oslo.i18n >= 2.1.0
BuildRequires:  python-oslo.log >= 3.22.0
BuildRequires:  python-oslo.privsep >= 1.9.0
BuildRequires:  python-oslo.versionedobjects >= 1.17.0
BuildRequires:  python-oslotest >= 1.10.0
BuildRequires:  python-pbr >= 2.0.0
BuildRequires:  python-pyroute2 >= 0.4.21
BuildRequires:  python-python-subunit >= 0.0.18
BuildRequires:  python-six >= 1.9.0
BuildRequires:  python-stestr
BuildRequires:  python-stevedore >= 1.20.0
BuildRequires:  python-testrepository >= 0.0.18
BuildRequires:  python-testscenarios >= 0.4
BuildRequires:  python-testtools >= 1.4.0
Requires:       python-netaddr >= 0.7.13
Requires:       python-oslo.concurrency >= 3.8.0
Requires:       python-oslo.config >= 4.0.0
Requires:       python-oslo.i18n >= 2.1.0
Requires:       python-oslo.log >= 3.22.0
Requires:       python-oslo.privsep >= 1.9.0
Requires:       python-oslo.versionedobjects >= 1.17.0
Requires:       python-pbr >= 2.0.0
Requires:       python-pyroute2 >= 0.4.21
Requires:       python-six >= 1.9.0
Requires:       python-stevedore >= 1.20.0
BuildArch:      noarch

%description
A library for plugging and unplugging virtual interfaces in OpenStack.
Features:
* A base VIF plugin class that supplies a plug() and unplug() interface
* Versioned objects that represent a virtual interface and its components

%package doc
Summary:        Documentation for a library for plugging and unplugging virtual interfaces in OpenStack
Group:          Development/Languages/Python
BuildRequires:  python-Sphinx
BuildRequires:  python-openstackdocstheme >= 1.11.0
BuildRequires:  python-reno >= 1.8.0

%description doc
Documentation for a library for plugging and unplugging virtual interfaces
in OpenStack.

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

%build
%{py2_build}

%install
%{py2_install}

# generate html docs
PBR_VERSION=1.10.0 sphinx-build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

%check
stestr --test-path="os_vif/tests/unit" run

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

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

%changelog
openSUSE Build Service is sponsored by