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

#
# spec file for package python-oslo.context
#
# Copyright (c) 2015 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/
#


Name:           python-oslo.context
Version:        0.6.0
Release:        0
Url:            https://launchpad.net/oslo.context
Summary:        Helpers to maintain useful information about a request context
License:        Apache-2.0
Group:          Development/Languages/Python
Source:         https://pypi.python.org/packages/source/o/oslo.context/oslo.context-%{version}.tar.gz
BuildRequires:  openstack-suse-macros
BuildRequires:  python-devel
BuildRequires:  python-pbr
# Needed for tests
BuildRequires:  python-coverage
BuildRequires:  python-oslotest
Requires:       python-Babel >= 1.3
BuildArch:      noarch

%description
The Oslo context library has helpers to maintain useful information
about a request context. The request context is usually populated in
the WSGI pipeline and used by various modules such as logging.

%package doc
Summary:        Documentation for the OpenStack Oslo context library
Group:          Development/Languages/Python
BuildRequires:  python-oslosphinx
BuildRequires:  python-sphinx

%description doc
Documentation for the OpenStack Oslo context library.

%prep
%setup -q -n oslo.context-%{version}

%build
%{__python2} setup.py build

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

%install
%{__python2} setup.py install --skip-build --root %{buildroot}

%check
export PYTHONPATH="%{python2_sitelib}:%{buildroot}%{python2_sitelib}"
export PYTHON="python -S"
testr init && testr run --parallel

%files
%defattr(-,root,root,-)
%doc README.rst ChangeLog LICENSE AUTHORS
%{python2_sitelib}/*

%files doc
%doc html

%changelog
openSUSE Build Service is sponsored by