python.pkgs.ldap: fix build
This commit is contained in:
parent
1c7e1f0ef9
commit
887f8b9992
@ -1,18 +1,21 @@
|
||||
{ lib, writeText, buildPythonPackage, isPy3k, fetchPypi
|
||||
, openldap, cyrus_sasl, openssl, pytest, pyasn1 }:
|
||||
{ lib, buildPythonPackage, fetchPypi
|
||||
, pyasn1, pyasn1-modules, pytest
|
||||
, openldap, cyrus_sasl }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-ldap";
|
||||
version = "3.0.0";
|
||||
name = "${pname}-${version}";
|
||||
disabled = isPy3k;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "86746b912a2cd37a54b06c694f021b0c8556d4caeab75ef50435ada152e2fbe1";
|
||||
};
|
||||
|
||||
checkInputs = [ pytest pyasn1 ];
|
||||
propagatedBuildInputs = [ pyasn1 pyasn1-modules ];
|
||||
|
||||
buildInputs = [ openldap cyrus_sasl ];
|
||||
|
||||
checkInputs = [ pytest ];
|
||||
|
||||
checkPhase = ''
|
||||
# Needed by tests to setup a mockup ldap server.
|
||||
@ -21,28 +24,6 @@ buildPythonPackage rec {
|
||||
export SLAPD="${openldap}/libexec/slapd"
|
||||
export SCHEMA="${openldap}/etc/schema"
|
||||
|
||||
# AssertionError: expected errno=107, got 57 -> nix sandbox related ?
|
||||
py.test -k 'not TestLdapCExtension and \
|
||||
not Test01_SimpleLDAPObject and \
|
||||
not Test02_ReconnectLDAPObject' Tests/*.py
|
||||
py.test
|
||||
'';
|
||||
|
||||
patches = lib.singleton (writeText "avoid-syslog.diff" ''
|
||||
diff a/Lib/slapdtest.py b/Lib/slapdtest.py
|
||||
--- a/Lib/slapdtest.py
|
||||
+++ b/Lib/slapdtest.py
|
||||
@@ -60,7 +60,8 @@ def combined_logger(
|
||||
pass
|
||||
# for writing to syslog
|
||||
new_logger = logging.getLogger(log_name)
|
||||
- if sys_log_format:
|
||||
+ # /dev/log does not exist in nix build environment.
|
||||
+ if False:
|
||||
my_syslog_formatter = logging.Formatter(
|
||||
fmt=' '.join((log_name, sys_log_format)))
|
||||
my_syslog_handler = logging.handlers.SysLogHandler(
|
||||
'');
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-I${cyrus_sasl.dev}/include/sasl";
|
||||
propagatedBuildInputs = [openldap cyrus_sasl openssl];
|
||||
}
|
||||
|
@ -11525,7 +11525,7 @@ in {
|
||||
progressbar2 = callPackage ../development/python-modules/progressbar2 { };
|
||||
|
||||
ldap = callPackage ../development/python-modules/ldap {
|
||||
inherit (pkgs) openldap cyrus_sasl openssl;
|
||||
inherit (pkgs) openldap cyrus_sasl;
|
||||
};
|
||||
|
||||
ldap3 = callPackage ../development/python-modules/ldap3 {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user