File python-os-win.spec of Package python-os-win
#
# spec file for package python-os-win
#
# Copyright (c) 2018 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 http://bugs.opensuse.org/
#
%global sname os-win
Name: python-os-win
Version: 3.0.0
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 >= 1.0.1
BuildRequires: python-devel
BuildRequires: python-eventlet >= 0.18.2
BuildRequires: python-mock >= 2.0.0
BuildRequires: python-oslo.concurrency >= 3.25.0
BuildRequires: python-oslo.i18n >= 3.15.3
BuildRequires: python-oslo.log >= 3.36.0
BuildRequires: python-oslosphinx >= 4.7.0
BuildRequires: python-oslotest >= 3.2.0
BuildRequires: python-pbr >= 2.0.0
BuildRequires: python-python-subunit >= 1.0.0
BuildRequires: python-testrepository >= 0.0.18
BuildRequires: python-testscenarios >= 0.4
BuildRequires: python-testtools >= 2.2.0
Requires: python-Babel >= 2.3.4
Requires: python-eventlet >= 0.18.2
Requires: python-oslo.concurrency >= 3.25.0
Requires: python-oslo.config >= 5.1.0
Requires: python-oslo.i18n >= 3.15.3
Requires: python-oslo.log >= 3.36.0
Requires: python-oslo.service >= 1.24.0
Requires: python-oslo.utils >= 3.33.0
Requires: python-pbr >= 2.0.0
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-openstackdocstheme >= 1.18.1
%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
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg
%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