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.7.1
Release:        0
Summary:        Hyper-V library for OpenStack projects
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://docs.openstack.org/os-win
Source0:        https://files.pythonhosted.org/packages/source/o/os-win/os-win-5.7.1.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python3-devel
BuildRequires:  python39-Sphinx
BuildRequires:  python39-ddt
BuildRequires:  python39-eventlet
BuildRequires:  python39-oslo.concurrency
BuildRequires:  python39-oslo.i18n
BuildRequires:  python39-oslo.log
BuildRequires:  python39-oslotest
BuildRequires:  python39-pbr
BuildRequires:  python39-reno
BuildRequires:  python39-stestr
BuildRequires:  python39-testscenarios
BuildRequires:  python39-testtools
BuildArch:      noarch

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

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

%description -n python39-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:  python39-Sphinx
BuildRequires:  python39-openstackdocstheme

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

%prep
%autosetup -n os-win-5.7.1
%py_req_cleanup
# we don't want to run the hacking tests again (and don't 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
%{openstack_stestr_run}

%files -n python39-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