From a090f3bfb11e7594f4cd4b67b7e3ddcfe686d46f Mon Sep 17 00:00:00 2001 From: Alexander Tsamutali Date: Tue, 13 Sep 2016 16:12:24 +0300 Subject: [PATCH] Add spec template for stevedore Change-Id: Ie33a330363560e67d9c7ecc2a689c07b0e2d7a74 --- openstack/stevedore/stevedore.spec.j2 | 77 +++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 openstack/stevedore/stevedore.spec.j2 diff --git a/openstack/stevedore/stevedore.spec.j2 b/openstack/stevedore/stevedore.spec.j2 new file mode 100644 index 000000000..5fcf5dd59 --- /dev/null +++ b/openstack/stevedore/stevedore.spec.j2 @@ -0,0 +1,77 @@ +%global pypi_name stevedore +Name: {{ py2name('stevedore') }} +Version: 1.17.1 +Release: 0 +Summary: Manage dynamic plugins for Python applications +License: {{ 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: {{ py2pkg('mock') }} +BuildRequires: {{ py2pkg('oslotest') }} +BuildRequires: {{ py2pkg('pbr') }} +BuildRequires: {{ py2pkg('setuptools') }} +Requires: {{ py2pkg('pbr') }} +Requires: {{ py2pkg('six') }} +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: {{ py2pkg('Sphinx') }} +BuildRequires: {{ py2pkg('oslosphinx') }} + +%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 +%setup -q -n %{pypi_name}-%{version} + +%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