File python-networking-hyperv.spec of Package python-networking-hyperv

#
# spec file for package python-networking-hyperv
#
# 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 component networking-hyperv

%define version_unconverted 5.0.1.dev5

Name:           python-networking-hyperv
Version:        5.0.1~dev5
Release:        0
Summary:        Hyperv for OpenStack Networking (Neutron)
License:        Apache-2.0
Group:          System/Management
Url:            https://wiki.openstack.org/wiki/Hyper-V
Source:         http://tarballs.openstack.org/networking-hyperv/networking-hyperv-stable-pike.tar.gz
BuildRequires:  fdupes
BuildRequires:  openstack-suse-macros
BuildRequires:  python-base
BuildRequires:  python-pbr
BuildRequires:  python-setuptools
Requires:       openstack-neutron
Requires:       python >= 2.7
Requires:       python-Babel >= 2.3.4
Requires:       python-eventlet >= 0.18.2
Requires:       python-neutron-lib >= 1.9.0
Requires:       python-neutronclient >= 6.3.0
Requires:       python-os-win >= 2.0.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.serialization >= 1.10.0
Requires:       python-oslo.utils >= 3.20.0

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif

%description
This project tracks the work to integrate the Hyper-V networking with Neutron.
This project contains the Hyper-V Neutron Agent Mixin, Security Groups Driver,
ML2 Mechanism Driver and the utils modules they use in order to properly bind
neutron ports on a Hyper-V host.

%package test
Summary:        Hyperv for OpenStack Networking (Networking) - Testsuite
Group:          System/Management
Requires:       %{name} = %{version}

%prep
%setup -q -n %{component}-%{version_unconverted}
%openstack_cleanup_prep

%description test
This project tracks the work to integrate the Hyper-V networking with Neutron.
This project contains the Hyper-V Neutron Agent Mixin, Security Groups Driver,
ML2 Mechanism Driver and the utils modules they use in order to properly bind
neutron ports on a Hyper-V host.
This package contains the tests.

%build
python setup.py build

%install
python setup.py install --root %{buildroot} --prefix %{_prefix}
%fdupes %{buildroot}%{python_sitelib}/

%files
%defattr(-,root,root,-)
%doc LICENSE
%{python_sitelib}/networking_hyperv/
%{python_sitelib}/networking_hyperv*.egg-info
# Part of test subpackage
%exclude %{python_sitelib}/networking_hyperv/tests/unit
%{_bindir}/neutron-hyperv-agent
%{_bindir}/neutron-hnv-agent
%{_bindir}/neutron-hnv-metadata-proxy

%files test
%defattr(-,root,root)
%doc LICENSE
%dir %{python_sitelib}/networking_hyperv/tests
%dir %{python_sitelib}/networking_hyperv/tests/unit

%changelog
openSUSE Build Service is sponsored by