File python-ldappool.spec of Package python-ldappool
#
# spec file for package python-ldappool
#
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-ldappool
Version: 2.1.0
Release: 0
Summary: A connection pool for python-ldap
License: MPL-1.1 or GPL-2.0+ or LGPL-2.1+
Group: Development/Languages/Python
Url: https://github.com/mozilla-services/ldappool
Source: https://files.pythonhosted.org/packages/source/l/ldappool/ldappool-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pbr}
BuildRequires: %{python_module pyldap}
BuildRequires: python-rpm-macros
# Test requirements
BuildRequires: %{python_module testrepository}
BuildRequires: %{python_module testresources}
BuildRequires: %{python_module testtools}
Requires: python-pyldap >= 2.4.20
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
A simple connector pool for python-ldap.
The pool keeps LDAP connectors alive and let you reuse them,
drastically reducing the time spent to initiate a ldap connection.
The pool has useful features like:
- transparent reconnection on failures or server restarts
- configurable pool size and connectors timeouts
- configurable max lifetime for connectors
- a context manager to simplify acquiring and releasing a connector
%prep
%setup -q -n ldappool-%{version}
%build
%python_build
%install
%python_install
%check
%{python_expand rm -rf .testrepository
$python setup.py test
}
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGES.rst README.rst
%{python_sitelib}/*
%changelog