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

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

# NOTE(ykarel): This is required to prevent singlespec macros from changing the requires
%global oldpython python
Name:           python-os-brick
Version:        2.5.10
Release:        0
Summary:        OpenStack Cinder brick library for managing local volume attaches
License:        Apache-2.0
Group:          Development/Languages/Python
Patch0:         0001-Remove-VxFlex-OS-credentials-from-connection_propert.patch
Patch1:         0002-Fix-Remove-VxFlex-OS-credentials-regression.patch
BuildRequires:  openstack-macros
BuildRequires:  python-devel
BuildRequires:  python2-Babel
BuildRequires:  python2-castellan
BuildRequires:  python2-ddt
BuildRequires:  python2-eventlet
BuildRequires:  python2-os-win
BuildRequires:  python2-oslo.concurrency
BuildRequires:  python2-oslo.i18n
BuildRequires:  python2-oslo.log
BuildRequires:  python2-oslo.privsep
BuildRequires:  python2-oslo.service
BuildRequires:  python2-oslo.utils
BuildRequires:  python2-oslo.vmware
BuildRequires:  python2-oslotest
BuildRequires:  python2-pbr
BuildRequires:  python2-python-subunit
BuildRequires:  python2-reno
BuildRequires:  python2-requests
BuildRequires:  python2-retrying
BuildRequires:  python2-six
BuildRequires:  python2-stestr
BuildRequires:  python2-testscenarios
BuildRequires:  python2-testtools
BuildRequires:  python3-Babel
BuildRequires:  python3-castellan
BuildRequires:  python3-ddt
BuildRequires:  python3-devel
BuildRequires:  python3-eventlet
BuildRequires:  python3-os-win
BuildRequires:  python3-oslo.concurrency
BuildRequires:  python3-oslo.i18n
BuildRequires:  python3-oslo.log
BuildRequires:  python3-oslo.privsep
BuildRequires:  python3-oslo.service
BuildRequires:  python3-oslo.utils
BuildRequires:  python3-oslo.vmware
BuildRequires:  python3-oslotest
BuildRequires:  python3-pbr
BuildRequires:  python3-python-subunit
BuildRequires:  python3-reno
BuildRequires:  python3-requests
BuildRequires:  python3-retrying
BuildRequires:  python3-six
BuildRequires:  python3-stestr
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
Requires:       %{oldpython}-os-brick-common
Requires:       python-Babel
Requires:       python-eventlet
Requires:       python-os-win
Requires:       python-oslo.concurrency
Requires:       python-oslo.i18n
Requires:       python-oslo.log
Requires:       python-oslo.privsep
Requires:       python-oslo.service
Requires:       python-oslo.utils
Requires:       python-requests
Requires:       python-retrying
Requires:       python-six
BuildArch:      noarch

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

%package -n python-os-brick-doc
Summary:        Documentation for OpenStack os-brick library
Group:          Development/Languages/Python
BuildRequires:  python-Sphinx
BuildRequires:  python-openstackdocstheme

%description -n python-os-brick-doc
OpenStack Cinder brick library for managing local volume attaches.
- 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
Group:          Development/Languages/Python

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

%autosetup -p1 -N -n os-brick-2.5.10
%patch0 -p1
%patch1 -p1
rm -rf *requirements.txt
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg


# generate html docs
%{__python2} build_sphinx
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}


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

%python_exec -m stestr.cli run --concurrency=1

%files %{python_files}
%license LICENSE
%doc README.rst ChangeLog

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

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

openSUSE Build Service is sponsored by