File python-ldappool.spec of Package python-ldappool
#
# spec file for package python-ldappool
#
# 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-ldappool
Version: 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://pypi.python.org/packages/source/l/ldappool/ldappool-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-ldap
BuildRequires: python-nose
Requires: python-ldap
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%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 setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%check
nosetests
%files
%defattr(-,root,root,-)
%doc CHANGES.rst README.rst
%{python_sitelib}/*
%changelog