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

#
# spec file for package python-os-win
#
# 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/
#


%global sname os-win
Name:           python-os-win
Version:        2.2.1
Release:        0
Summary:        Hyper-V library for OpenStack projects
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/%{sname}
Source0:        https://files.pythonhosted.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-Sphinx
BuildRequires:  python-ddt
BuildRequires:  python-devel
BuildRequires:  python-eventlet
BuildRequires:  python-mock
BuildRequires:  python-oslo.concurrency
BuildRequires:  python-oslo.i18n
BuildRequires:  python-oslo.log
BuildRequires:  python-oslosphinx
BuildRequires:  python-oslotest
BuildRequires:  python-pbr
BuildRequires:  python-python-subunit
BuildRequires:  python-testrepository
BuildRequires:  python-testscenarios
BuildRequires:  python-testtools
Requires:       python-Babel
Requires:       python-eventlet
Requires:       python-oslo.concurrency
Requires:       python-oslo.config
Requires:       python-oslo.i18n
Requires:       python-oslo.log
Requires:       python-oslo.service
Requires:       python-oslo.utils
Requires:       python-pbr
BuildArch:      noarch

%description
Library contains Windows / Hyper-V code commonly used in the OpenStack projects:
nova, cinder, networking-hyperv.

%package doc
Summary:        Documentation for OpenStack Windows/Hyper-V Library
Group:          Documentation/HTML
BuildRequires:  python-Sphinx
BuildRequires:  python-oslosphinx

%description doc
Documentation for the Hyper-V library.

%prep
%autosetup -n %{sname}-%{version}
%py_req_cleanup
# we dont want to run the hacking tests again (and dont want the needed deps)
rm -f os_win/tests/unit/test_hacking.py

%build
%{py2_build}
%{__python2} setup.py build_sphinx --builder=html,man
rm -rf html/.{doctrees,buildinfo}

%install
%{py2_install}
install -p -D -m 644 doc/build/man/os-win.1 %{buildroot}/%{_mandir}/man1/os-win.1

%check
%{__python2} setup.py test

%files
%doc README.rst ChangeLog
%license LICENSE
%{python2_sitelib}/os_win*
%{python2_sitelib}/*.egg-info
%{_mandir}/man1/os-win.1*

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

%changelog
openSUSE Build Service is sponsored by