File python-vmware-nsx.spec of Package python-vmware-nsx

#
# spec file for package python-vmware-nsx
#
# 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/
#


Name:           python-vmware-nsx
Version:        13.0.1~dev146
Release:        0
Summary:        VMware-NSX family of Neutron plugins
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/vmware-nsx
Source0:        vmware-nsx-stable-rocky.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-neutron-lib >= 1.18.0
BuildRequires:  python-oslo.vmware >= 2.17.0
BuildRequires:  python-tooz >= 1.58.0
BuildRequires:  python2-mock >= 2.0.0
BuildRequires:  python2-os-testr
BuildRequires:  python2-oslo.log >= 3.36.0
BuildRequires:  python2-oslotest
BuildRequires:  python2-requests-mock
BuildRequires:  python2-testrepository
BuildRequires:  python2-testresources
BuildRequires:  python2-testscenarios
BuildRequires:  python2-testtools
BuildRequires:  python2-vmware-nsxlib >= 13.0.0
BuildRequires:  python3-mock >= 2.0.0
BuildRequires:  python3-os-testr
BuildRequires:  python3-oslo.log >= 3.36.0
BuildRequires:  python3-oslotest
BuildRequires:  python3-requests-mock
BuildRequires:  python3-testrepository
BuildRequires:  python3-testresources
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
BuildRequires:  python3-vmware-nsxlib >= 13.0.0
Requires:       python-PrettyTable >= 0.7.2
Requires:       python-SQLAlchemy >= 1.2.0
Requires:       python-decorator >= 4.3.0
Requires:       python-eventlet >= 0.18.2
Requires:       python-httplib2 >= 0.9.1
Requires:       python-mock >= 2.0.0
Requires:       python-netaddr >= 0.7.18
Requires:       python-openstackclient >= 3.16.0
Requires:       python-osc-lib >= 1.10.0
Requires:       python-oslo.concurrency >= 3.26.0
Requires:       python-oslo.config >= 5.2.0
Requires:       python-oslo.db >= 4.27.0
Requires:       python-oslo.i18n >= 3.15.3
Requires:       python-oslo.log >= 3.36.0
Requires:       python-oslo.serialization >= 2.18.0
Requires:       python-oslo.utils >= 3.33.0
Requires:       python-six >= 1.10.0
Requires:       python-stevedore >= 1.20.0
Requires:       python-tenacity >= 4.4.0
Requires:       python-vmware-nsxlib >= 13.0.0
BuildArch:      noarch
%ifpython2
Requires:       python-enum34
Requires:       python-neutron-lib >= 1.18.0
Requires:       python-oslo.service >= 1.31.0
Requires:       python-oslo.vmware >= 2.17.0
Requires:       python-tooz >= 1.58.0
%endif
%python_subpackages

%description
VMWare NSX plugins for the OpenStack Neutron component

%package -n python-vmware-nsx-doc
Summary:        Documentation for vmware-nsx
Group:          Documentation/HTML
BuildRequires:  fdupes
BuildRequires:  python-Sphinx
BuildRequires:  python-oslosphinx

%description -n python-vmware-nsx-doc
VMWare NSX plugins for the OpenStack Neutron component
This package contains the documentation

%prep
%autosetup -p1 -n vmware-nsx-13.0.1.dev146
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg

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

%install
%{python_install}
%python_clone -a %{buildroot}%{_bindir}/neutron-check-nsx-config
%python_clone -a %{buildroot}%{_bindir}/nsxadmin
%python_clone -a %{buildroot}%{_bindir}/nsx-migration
# remove duplicates
%fdupes %{buildroot}%{python_sitelib}

# %check
# %{python_expand rm -rf .testrepository
# ostestr
# }

%files %{python_files}
%defattr(-,root,root,-)
%license LICENSE
%{python_sitelib}/vmware_nsx
%{python_sitelib}/*.egg-info
%python_alternative %{_bindir}/neutron-check-nsx-config
%python_alternative %{_bindir}/nsxadmin
%python_alternative %{_bindir}/nsx-migration

%files -n python-vmware-nsx-doc
%license LICENSE
%doc README.rst doc/build/html

%changelog