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

#
# spec file for package python-vmware-nsxlib
#
# Copyright (c) 2020 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-vmware-nsxlib
Version:        13.0.1~dev24
Release:        0
Summary:        VMware NSX python library
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/vmware-nsxlib
Source0:        vmware-nsxlib-stable-rocky.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-neutron-lib
BuildRequires:  python2-mock
BuildRequires:  python2-os-testr
BuildRequires:  python2-oslo.log
BuildRequires:  python2-oslotest
BuildRequires:  python2-pyOpenSSL
BuildRequires:  python2-requests-mock
BuildRequires:  python2-testrepository
BuildRequires:  python2-testresources
BuildRequires:  python2-testscenarios
BuildRequires:  python2-testtools
BuildRequires:  python3-mock
BuildRequires:  python3-os-testr
BuildRequires:  python3-oslo.log
BuildRequires:  python3-oslotest
BuildRequires:  python3-pyOpenSSL
BuildRequires:  python3-requests-mock
BuildRequires:  python3-testrepository
BuildRequires:  python3-testresources
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
Requires:       python-eventlet
Requires:       python-netaddr
Requires:       python-oslo.i18n
Requires:       python-oslo.log
Requires:       python-oslo.serialization
Requires:       python-oslo.utils
Requires:       python-pyOpenSSL
Requires:       python-six
Requires:       python-tenacity
BuildArch:      noarch
%ifpython2
Requires:       python-enum34
Requires:       python-neutron-lib
Requires:       python-oslo.service
%endif
%python_subpackages

%description
vmware-nsxlib is a python library that interfaces with VMWare NSX

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

%description -n python-vmware-nsxlib-doc
vmware-nsxlib is a python library that interfaces with VMWare NSX
This package contains the documentation

%prep
%autosetup -p1 -n vmware-nsxlib-13.0.1.dev24
%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.dev24 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}
# remove duplicates
%fdupes %{buildroot}%{python_sitelib}

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

%files %{python_files}
%defattr(-,root,root,-)
%license LICENSE
%{python_sitelib}/vmware_nsxlib
%{python_sitelib}/*.egg-info

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

%changelog
openSUSE Build Service is sponsored by