File python-stevedore.spec of Package python-stevedore
#
# spec file for package python-stevedore
#
# 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 pypi_name stevedore
Name: python-stevedore
Version: 1.20.0
Release: 0
Summary: Manage dynamic plugins for Python applications
License: Apache-2.0
Group: Development/Languages/Python
Url: http://docs.openstack.org/developer/stevedore/
Source0: https://tarballs.openstack.org/stevedore/%{pypi_name}-%{version}.tar.gz
BuildRequires: openstack-macros
BuildRequires: python-devel
BuildRequires: python-mock >= 2.0
BuildRequires: python-oslotest >= 1.10.0
BuildRequires: python-pbr >= 1.8
BuildRequires: python-setuptools >= 16.0
Requires: python-pbr >= 1.8
Requires: python-six >= 1.9.0
BuildArch: noarch
%description
Python makes loading code dynamically easy, allowing you to configure
and extend your application by discovering and loading extensions
(plugins) at runtime. Many applications implement their own
library for doing this, using ``__import__`` or ``importlib``.
stevedore avoids creating yet another extension
mechanism by building on top of setuptools entry points. The code
for managing entry points tends to be repetitive, though, so stevedore
provides manager classes for implementing common patterns for using
dynamically loaded extensions.
%package doc
Summary: Documentation for %{name}
Group: Documentation
BuildRequires: python-Sphinx
BuildRequires: python-oslosphinx >= 4.7.0
%description doc
Python makes loading code dynamically easy, allowing you to configure
and extend your application by discovering and loading extensions
(plugins) at runtime. Many applications implement their own
library for doing this, using ``__import__`` or ``importlib``.
stevedore avoids creating yet another extension
mechanism by building on top of setuptools entry points. The code
for managing entry points tends to be repetitive, though, so stevedore
provides manager classes for implementing common patterns for using
dynamically loaded extensions.
This package contains documentation in HTML format.
%prep
%autosetup -n %{pypi_name}-%{version}
%py_req_cleanup
%build
%py2_build
# generate html docs
%{__python2} setup.py build_sphinx
# remove the Sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%check
%{__python2} setup.py testr
%install
%py2_install
%files
%license LICENSE
%doc README.rst
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-*.egg-info
%files doc
%license LICENSE
%doc doc/build/html
%changelog