File python-glance_store.spec of Package python-glance_store

#
# spec file for package python-glance_store
#
# 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 https://bugs.opensuse.org/
#


Name:           python-glance_store
Version:        0.26.1
Release:        0
Summary:        OpenStack Image Service Store Library
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/glance_store
Source0:        https://files.pythonhosted.org/packages/source/g/glance_store/glance_store-0.26.1.tar.gz
BuildRequires:  fdupes
BuildRequires:  openstack-macros
BuildRequires:  python2-cinderclient
BuildRequires:  python2-debtcollector
BuildRequires:  python2-eventlet
BuildRequires:  python2-fixtures
BuildRequires:  python2-jsonschema
BuildRequires:  python2-keystoneclient
BuildRequires:  python2-mock
BuildRequires:  python2-os-brick
BuildRequires:  python2-os-testr
BuildRequires:  python2-oslo.concurrency
BuildRequires:  python2-oslo.config
BuildRequires:  python2-oslo.i18n
BuildRequires:  python2-oslo.serialization
BuildRequires:  python2-oslo.utils
BuildRequires:  python2-oslo.vmware
BuildRequires:  python2-oslotest
BuildRequires:  python2-python-subunit
BuildRequires:  python2-requests
BuildRequires:  python2-requests-mock
BuildRequires:  python2-six
BuildRequires:  python2-stestr
BuildRequires:  python2-stevedore
BuildRequires:  python2-swiftclient
BuildRequires:  python2-testscenarios
BuildRequires:  python2-testtools
BuildRequires:  python3-cinderclient
BuildRequires:  python3-debtcollector
BuildRequires:  python3-eventlet
BuildRequires:  python3-fixtures
BuildRequires:  python3-jsonschema
BuildRequires:  python3-keystoneclient
BuildRequires:  python3-mock
BuildRequires:  python3-os-brick
BuildRequires:  python3-os-testr
BuildRequires:  python3-oslo.concurrency
BuildRequires:  python3-oslo.config
BuildRequires:  python3-oslo.i18n
BuildRequires:  python3-oslo.serialization
BuildRequires:  python3-oslo.utils
BuildRequires:  python3-oslo.vmware
BuildRequires:  python3-oslotest
BuildRequires:  python3-python-subunit
BuildRequires:  python3-requests
BuildRequires:  python3-requests-mock
BuildRequires:  python3-six
BuildRequires:  python3-stestr
BuildRequires:  python3-stevedore
BuildRequires:  python3-swiftclient
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
Requires:       python-cinderclient
Requires:       python-debtcollector
Requires:       python-eventlet
Requires:       python-httplib2
Requires:       python-jsonschema
Requires:       python-keystoneauth1
Requires:       python-keystoneclient
Requires:       python-os-brick
Requires:       python-oslo.concurrency
Requires:       python-oslo.config
Requires:       python-oslo.i18n
Requires:       python-oslo.rootwrap
Requires:       python-oslo.serialization
Requires:       python-oslo.utils
Requires:       python-oslo.vmware
Requires:       python-requests
Requires:       python-six
Requires:       python-stevedore
Requires:       python-swiftclient
BuildArch:      noarch
%ifpython2
BuildRequires:  python-enum34
Requires:       python-enum34
%endif
%if 0%{?suse_version}
Requires(post): update-alternatives
Requires(postun): update-alternatives
%else
# on RDO, update-alternatives is in chkconfig
Requires(post): chkconfig
Requires(postun): chkconfig
%endif
%python_subpackages

%description
Glance store library.

%package -n python-glance_store-doc
Summary:        Documentation for OpenStack Image Service Store Library
Group:          Documentation/HTML
BuildRequires:  python-Sphinx
BuildRequires:  python-openstackdocstheme
BuildRequires:  python-sphinxcontrib-apidoc

%description -n python-glance_store-doc
Documentation for the Glance store library.

%prep
%autosetup -p1 -n glance_store-0.26.1
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg

%build
%{python_build}
PBR_VERSION=0.26.1 sphinx-build -b html doc/source doc/build/html
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
%{python_install}
%fdupes %{buildroot}%{python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/glance-rootwrap

%post
%python_install_alternative glance-rootwrap

%postun
%python_uninstall_alternative glance-rootwrap

%check
%{python_expand rm -rf .stestr
PYTHON=$python PYTHONPATH="." stestr run
}

%files %{python_files}
%doc README.rst ChangeLog
%license LICENSE
%{python_sitelib}/glance_store*
%{python_sitelib}/*.egg-info
%python_alternative %{_bindir}/glance-rootwrap

%files -n python-glance_store-doc
%doc doc/build/html
%license LICENSE

%changelog
openSUSE Build Service is sponsored by