File python-oslo.privsep.spec of Package python-oslo.privsep

#
# spec file for package python-oslo.privsep
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


%global sname oslo.privsep
Name:           python-oslo.privsep
Version:        1.13.2
Release:        0
Summary:        OpenStack library for privilege separation
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            http://launchpad.net/oslo.privsep
Source0:        https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-Babel
BuildRequires:  python-Sphinx
BuildRequires:  python-cffi
BuildRequires:  python-devel
BuildRequires:  python-enum34
BuildRequires:  python-eventlet
BuildRequires:  python-greenlet
BuildRequires:  python-msgpack-python
BuildRequires:  python-oslo.config
BuildRequires:  python-oslo.i18n
BuildRequires:  python-oslo.log
BuildRequires:  python-oslo.utils
BuildRequires:  python-oslosphinx
BuildRequires:  python-oslotest
BuildRequires:  python-pbr
BuildRequires:  python-setuptools
Requires:       python-Babel
Requires:       python-cffi
Requires:       python-enum34
Requires:       python-eventlet
Requires:       python-greenlet
Requires:       python-msgpack-python
Requires:       python-oslo.config
Requires:       python-oslo.i18n
Requires:       python-oslo.log
Requires:       python-oslo.utils
BuildArch:      noarch

%description
OpenStack library for privilege separation

%package doc
Summary:        oslo.privsep documentation
Group:          Development/Languages/Python
Requires:       %{name} = %{version}

%description doc
Documentation for oslo.privsep

%prep
%setup -q -n %{sname}-%{version}

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

%install
%py2_install

%check
# FIXME: Disable tests failing in Fuel CI
# https://review.openstack.org/#/c/340524/
# Temporarily blacklist failing test
testr list-tests | \
grep -v oslo_privsep.tests.test_daemon.TestDaemon.test_drop_privs > tests
PYTHONPATH=. %{__python2} setup.py testr --testr-args "--load-list tests"

%files
%doc README.rst
%license LICENSE
%{_bindir}/privsep-helper
%{python2_sitelib}/oslo_privsep
%{python2_sitelib}/%{sname}-*-py?.?.egg-info

%files doc
%doc doc/build/html

%changelog