python3Packages.django-auth-ldap: fix build

Add additional hints to get tests going, but they're still failing with
missing LDAP schemas somewhere.
This commit is contained in:
Martin Weinelt 2022-02-14 18:13:51 +01:00
parent 007c8d9011
commit 1a36fd0e32
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -2,30 +2,50 @@
, buildPythonPackage
, fetchPypi
, isPy27
# buildtime
, setuptools-scm
# runtime
, ldap
, django
, mock
, setuptools-scm
# tests
, python
, pkgs
}:
buildPythonPackage rec {
pname = "django-auth-ldap";
version = "4.0.0";
format = "pyproject";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "276f79e624ce083ce13f161387f65ff1c0efe83ef8a42f2b9830d43317b15239";
};
nativeBuildInputs = [ setuptools-scm ];
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [ ldap django ];
propagatedBuildInputs = [
django
ldap
];
checkInputs = [ mock ];
# django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings
# ValueError: SCHEMADIR is None, ldap schemas are missing.
doCheck = false;
checkPhase = ''
runHook preCheck
export PATH=${pkgs.openldap}/bin:${pkgs.openldap}/libexec:$PATH
${python.interpreter} -m django test --settings tests.settings
runHook postCheck
'';
pythonImportsCheck = [ "django_auth_ldap" ];
meta = with lib; {