File python-stevedore.spec of Package python-stevedore
#
# spec file for package python-stevedore
#
# Copyright (c) 2018 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-stevedore
Version: 1.28.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://files.pythonhosted.org/packages/source/s/stevedore/stevedore-1.28.0.tar.gz
BuildRequires: openstack-macros
BuildRequires: python-devel
BuildRequires: python2-mock
BuildRequires: python2-pbr
BuildRequires: python2-setuptools
BuildRequires: python2-testrepository
BuildRequires: python3-devel
BuildRequires: python3-mock
BuildRequires: python3-pbr
BuildRequires: python3-setuptools
BuildRequires: python3-testrepository
Requires: python-pbr
Requires: python-six >= 1.10.0
BuildArch: noarch
%python_subpackages
%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 -n python-stevedore-doc
Summary: Documentation for %{name}
Group: Documentation/HTML
BuildRequires: python2-Sphinx
Provides: %{python_module stevedore-doc = %{version}}
%description -n python-stevedore-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 -p1 -n stevedore-%{version}
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg
%build
%python_build
# generate html docs
%{__python2} setup.py build_sphinx
# remove the Sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%python_install
%check
%{python_expand rm -rf .testrepository
$python setup.py test
}
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/stevedore
%{python_sitelib}/stevedore-*.egg-info
%files -n python-stevedore-doc
%license LICENSE
%doc doc/build/html
%changelog