From 5ebacbf4740c4d0e790ccd8974076b88a5d0123a Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Sat, 27 Mar 2021 05:59:08 -0400 Subject: [PATCH] python39Packages.ldap: unbreak (#117614) --- pkgs/development/python-modules/ldap/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/ldap/default.nix b/pkgs/development/python-modules/ldap/default.nix index e5cd3d3828e1..1b1aea2ab114 100644 --- a/pkgs/development/python-modules/ldap/default.nix +++ b/pkgs/development/python-modules/ldap/default.nix @@ -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; {