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

#
# spec file for package python-oslo.privsep
#
# Copyright (c) 2017 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 >= 2.3.4
BuildRequires:  python-Sphinx
BuildRequires:  python-cffi
BuildRequires:  python-devel
BuildRequires:  python-enum34
BuildRequires:  python-eventlet >= 0.18.2
BuildRequires:  python-greenlet >= 0.3.2
BuildRequires:  python-msgpack-python >= 0.4.0
BuildRequires:  python-oslo.config >= 3.14.0
BuildRequires:  python-oslo.i18n >= 2.1.0
BuildRequires:  python-oslo.log >= 1.14.0
BuildRequires:  python-oslo.utils >= 3.16.0
BuildRequires:  python-oslosphinx >= 2.5.0
BuildRequires:  python-oslotest >= 1.10.0
BuildRequires:  python-pbr >= 1.6
BuildRequires:  python-setuptools >= 16.0
Requires:       python-Babel >= 2.3.4
Requires:       python-cffi
Requires:       python-enum34
Requires:       python-eventlet >= 0.18.2
Requires:       python-greenlet >= 0.3.2
Requires:       python-msgpack-python >= 0.4.0
Requires:       python-oslo.config >= 3.14.0
Requires:       python-oslo.i18n >= 2.1.0
Requires:       python-oslo.log >= 1.14.0
Requires:       python-oslo.utils >= 3.16.0
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
openSUSE Build Service is sponsored by