python39Packages.ldap: unbreak (#117614)

This commit is contained in:
Robert T. McGibbon 2021-03-27 05:59:08 -04:00 committed by GitHub
parent 943347687f
commit 5ebacbf474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
{ buildPythonPackage, fetchPypi
, pyasn1, pyasn1-modules, pytest
, pyasn1, pyasn1-modules
, pythonAtLeast, pytestCheckHook
, openldap, cyrus_sasl, lib, stdenv }:
buildPythonPackage rec {
@ -13,20 +14,22 @@ buildPythonPackage rec {
propagatedBuildInputs = [ pyasn1 pyasn1-modules ];
checkInputs = [ pytestCheckHook ];
buildInputs = [ openldap cyrus_sasl ];
checkInputs = [ pytest ];
checkPhase = ''
preCheck = ''
# Needed by tests to setup a mockup ldap server.
export BIN="${openldap}/bin"
export SBIN="${openldap}/bin"
export SLAPD="${openldap}/libexec/slapd"
export SCHEMA="${openldap}/etc/schema"
py.test
'';
disabledTests = lib.optionals (pythonAtLeast "3.9") [
# See https://github.com/python-ldap/python-ldap/issues/407
"test_simple_bind_noarg"
];
doCheck = !stdenv.isDarwin;
meta = with lib; {