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

#
# spec file for package python-os-vif
#
# Copyright (c) 2023 SUSE LLC
#
# 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/
#


Name:           python-os-vif
Version:        2.8.0
Release:        0
Summary:        A library for plugging and unplugging virtual interfaces in OpenStack
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://docs.openstack.org/os-vif
Source0:        https://files.pythonhosted.org/packages/source/o/os-vif/os_vif-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python3-devel
BuildRequires:  python39-netaddr
BuildRequires:  python39-oslo.concurrency
BuildRequires:  python39-oslo.config
BuildRequires:  python39-oslo.i18n
BuildRequires:  python39-oslo.log
BuildRequires:  python39-oslo.privsep
BuildRequires:  python39-oslo.versionedobjects
BuildRequires:  python39-oslotest
BuildRequires:  python39-ovsdbapp
BuildRequires:  python39-pbr
BuildRequires:  python39-pyroute2
BuildRequires:  python39-python-subunit
BuildRequires:  python39-six
BuildRequires:  python39-stestr
BuildRequires:  python39-stevedore
BuildRequires:  python39-testrepository
BuildRequires:  python39-testscenarios
BuildRequires:  python39-testtools
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 -n python3-os-vif
Summary:        A library for plugging and unplugging virtual interfaces in OpenStack
Requires:       python39-debtcollector
Requires:       python39-netaddr
Requires:       python39-oslo.concurrency
Requires:       python39-oslo.config
Requires:       python39-oslo.i18n
Requires:       python39-oslo.log
Requires:       python39-oslo.privsep
Requires:       python39-oslo.versionedobjects
Requires:       python39-ovsdbapp
Requires:       python39-pbr
Requires:       python39-pyroute2
Requires:       python39-six
Requires:       python39-stevedore

%description -n python3-os-vif
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

This package contains the Python 3.x module.

%package -n python-os-vif-doc
Summary:        Documentation for a library for plugging and unplugging virtual interfaces in OpenStack
BuildRequires:  python39-Sphinx
BuildRequires:  python39-openstackdocstheme
BuildRequires:  python39-reno

%description -n python-os-vif-doc
Documentation for a library for plugging and unplugging virtual interfaces
in OpenStack.

%prep
%autosetup -p1 -n os_vif-2.8.0
%py_req_cleanup

%build
%{py3_build}

%install
%{py3_install}

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

%check
export OS_TEST_PATH="os_vif/tests/unit"
%{openstack_stestr_run}

%files -n python3-os-vif
%license LICENSE
%doc README.rst ChangeLog
%{python3_sitelib}/os_vif
%{python3_sitelib}/vif_plug_ovs
%{python3_sitelib}/vif_plug_linux_bridge
%{python3_sitelib}/vif_plug_noop
%{python3_sitelib}/*.egg-info

%files -n python-os-vif-doc
%license LICENSE
%doc doc/build/html

%changelog
openSUSE Build Service is sponsored by