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

#
# spec file for package python-os-win
#
# Copyright (c) 2023 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-os-win
Epoch:          0
Version:        5.2.0
Release:        0
Summary:        Hyper-V library for OpenStack projects
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/os-win
Source0:        https://files.pythonhosted.org/packages/source/o/os-win/os-win-5.2.0.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python3-Sphinx
BuildRequires:  python3-ddt
BuildRequires:  python3-devel
BuildRequires:  python3-eventlet
BuildRequires:  python3-mock
BuildRequires:  python3-oslo.concurrency
BuildRequires:  python3-oslo.i18n
BuildRequires:  python3-oslo.log
BuildRequires:  python3-oslotest
BuildRequires:  python3-pbr
BuildRequires:  python3-reno
BuildRequires:  python3-stestr
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
BuildArch:      noarch

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

%package -n python3-os-win
Summary:        Hyper-V library for OpenStack projects
Requires:       python3-Babel
Requires:       python3-eventlet
Requires:       python3-oslo.concurrency
Requires:       python3-oslo.config
Requires:       python3-oslo.i18n
Requires:       python3-oslo.log
Requires:       python3-oslo.service
Requires:       python3-oslo.utils
Requires:       python3-pbr

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

%package -n python-os-win-doc
Summary:        Documentation for OpenStack Windows/Hyper-V Library
Group:          Documentation/HTML
BuildRequires:  python3-Sphinx
BuildRequires:  python3-openstackdocstheme

%description -n python-os-win-doc
Documentation for the Hyper-V library.

%prep
%autosetup -n os-win-5.2.0
%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
%{py3_build}

PBR_VERSION=%{version} %sphinx_build -b html doc/source doc/build/html
PBR_VERSION=%{version} %sphinx_build -b man doc/source doc/build/man
rm -rf doc/build/html/.{doctrees,buildinfo}
rm -rf doc/build/man/.{doctrees,buildinfo}

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

%check
python3 -m stestr.cli run

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

%files -n python-os-win-doc
%doc doc/build/html
%license LICENSE

%changelog
openSUSE Build Service is sponsored by