python3Packages.django-polymorphic: Django >= 5.1.0

This commit is contained in:
Minijackson 2024-10-07 15:50:13 +02:00
parent bda93d1d82
commit e9cb4bdf4a
No known key found for this signature in database
GPG Key ID: FEA888C9F5D64F62

View File

@ -2,6 +2,7 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
python,
django,
dj-database-url,
@ -19,10 +20,21 @@ buildPythonPackage rec {
hash = "sha256-JJY+FoMPSnWuSsNIas2JedGJpdm6RfPE3E1VIjGuXIc=";
};
patches = [
# Spelling of assertQuerySetEqual changed in Django >= 4.2
(fetchpatch {
url = "https://github.com/jazzband/django-polymorphic/commit/63d291f8771847e716a37652f239e3966a3360e1.patch";
hash = "sha256-rvvD9zfjm8bgH1460BA5K44Oobzv1FRAYq9Rgg291B8=";
})
];
propagatedBuildInputs = [ django ];
nativeCheckInputs = [ dj-database-url ];
# Tests fail for Django >= 5.1.0
doCheck = lib.versionOlder django.version "5.1.0";
checkPhase = ''
${python.interpreter} runtests.py
'';