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

#
# spec file for package python-os-brick
#
# Copyright (c) 2025 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 oldpython python
Name:           python-os-brick
Version:        6.9.0
Release:        0
Summary:        OpenStack Cinder brick library for managing local volume attaches
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://docs.openstack.org/os-brick
Source0:        https://files.pythonhosted.org/packages/source/o/os-brick/os-brick-6.9.0.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python311-Babel
BuildRequires:  python311-castellan
BuildRequires:  python311-ddt
BuildRequires:  python311-eventlet
BuildRequires:  python311-oslo.concurrency
BuildRequires:  python311-oslo.i18n
BuildRequires:  python311-oslo.log
BuildRequires:  python311-oslo.privsep
BuildRequires:  python311-oslo.service
BuildRequires:  python311-oslo.utils
BuildRequires:  python311-oslo.vmware
BuildRequires:  python311-oslotest
BuildRequires:  python311-pbr
BuildRequires:  python311-psutil
BuildRequires:  python311-python-subunit
BuildRequires:  python311-reno
BuildRequires:  python311-requests
BuildRequires:  python311-six
BuildRequires:  python311-stestr
BuildRequires:  python311-tenacity
BuildRequires:  python311-testscenarios
BuildRequires:  python311-testtools
BuildArch:      noarch

%description
OpenStack Cinder brick library for managing local volume attaches.
Features:
- Discovery of volumes being attached to a host for many transport protocols.
- Removal of volumes from a host.

%package -n python311-os-brick
Summary:        OpenStack Cinder brick library for managing local volume attaches
Requires:       %{oldpython}-os-brick-common
Requires:       python311-Babel
Requires:       python311-eventlet
Requires:       python311-oslo.concurrency
Requires:       python311-oslo.i18n
Requires:       python311-oslo.log
Requires:       python311-oslo.privsep
Requires:       python311-oslo.service
Requires:       python311-oslo.utils
Requires:       python311-psutil
Requires:       python311-requests
Requires:       python311-six
Requires:       python311-tenacity

%description -n python311-os-brick
OpenStack Cinder brick library for managing local volume attaches.
Features:
- Discovery of volumes being attached to a host for many transport protocols.
- Removal of volumes from a host.

This package contains the PYthon 3.x module.

%package -n python-os-brick-doc
Summary:        Documentation for OpenStack os-brick library
BuildRequires:  python311-Sphinx
BuildRequires:  python311-openstackdocstheme

%description -n python-os-brick-doc
OpenStack Cinder brick library for managing local volume attaches.
Features:
- Discovery of volumes being attached to a host for many transport protocols.
- Removal of volumes from a host.
This package contains the documentation.

%package -n python-os-brick-common
Summary:        Common files for the OpenStack Cinder brick library

%description -n python-os-brick-common
Configuration files for the OpenStack Cinder brick library.

%prep
%autosetup -p1 -n os-brick-6.9.0
%py_req_cleanup

%build
%{py3_build}

# generate html docs
PBR_VERSION=%{version} %sphinx_build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
%{py3_install}

# move usr/etc to etc
mv %{buildroot}%{_prefix}%{_sysconfdir}/* %{buildroot}/%{_sysconfdir}/

%check
# Requires os-win
rm -rf os_brick/tests/windows os_brick/tests/remotefs/test_windows*.py
%{openstack_stestr_run} --concurrency=1

%files -n python311-os-brick
%license LICENSE
%doc README.rst ChangeLog
%{python3_sitelib}/os_brick
%{python3_sitelib}/*.egg-info

%files -n python-os-brick-common
%license LICENSE
%dir %{_sysconfdir}/rootwrap.d
%{_sysconfdir}/rootwrap.d/os-brick.filters

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

%changelog
openSUSE Build Service is sponsored by