1{ lib, buildPythonPackage, fetchPypi
2, pbr, python-ldap, prettytable, fixtures, testresources, testtools }:
3
4buildPythonPackage rec {
5 pname = "ldappool";
6 version = "3.0.0";
7
8 src = fetchPypi {
9 pname = "ldappool";
10 inherit version;
11 sha256 = "4bb59b7d6b11407f48ee01a781267e3c8ba98d91f426806ac7208612ae087b86";
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 = [ python-ldap prettytable ];
24
25 nativeCheckInputs = [ 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}