1{ lib, buildPythonPackage, fetchPypi
2, pbr, ldap, prettytable, fixtures, testresources, testtools }:
3
4buildPythonPackage rec {
5 pname = "ldappool";
6 version = "2.4.1";
7
8 src = fetchPypi {
9 pname = "ldappool";
10 inherit version;
11 sha256 = "23edef09cba4b1ae764f1ddada828d8e39d72cf32a457e599f5a70064310ea00";
12 };
13
14 postPatch = ''
15 # Tests run without most of the dependencies
16 echo "" > test-requirements.txt
17 # PrettyTable is now maintained again
18 substituteInPlace requirements.txt --replace "PrettyTable<0.8,>=0.7.2" "PrettyTable"
19 '';
20
21 nativeBuildInputs = [ pbr ];
22
23 propagatedBuildInputs = [ ldap prettytable ];
24
25 checkInputs = [ fixtures testresources testtools ];
26
27 meta = with lib; {
28 description = "A simple connector pool for python-ldap";
29 homepage = "https://opendev.org/openstack/ldappool/";
30 license = with licenses; [ mpl11 lgpl21Plus gpl2Plus ];
31 };
32}