pymilter: fix deprecation for Python test function

See upstream commit : https://github.com/sdgathman/pymilter/pull/57

Add patch hash

Add missing test dependency
This commit is contained in:
kenshin 2024-05-12 16:49:47 +02:00
parent e466c02ac3
commit 8ffb132e1e

View File

@ -1,4 +1,15 @@
{ lib, python, buildPythonPackage, fetchFromGitHub, libmilter, bsddb3, pydns, iana-etc, libredirect }: { lib
, python
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, libmilter
, bsddb3
, pydns
, iana-etc
, libredirect
, pyasyncore
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pymilter"; pname = "pymilter";
@ -13,7 +24,14 @@ buildPythonPackage rec {
}; };
buildInputs = [ libmilter ]; buildInputs = [ libmilter ];
nativeCheckInputs = [ pyasyncore ];
propagatedBuildInputs = [ bsddb3 pydns ]; propagatedBuildInputs = [ bsddb3 pydns ];
patches = [ (fetchpatch {
name = "Remove-calls-to-the-deprecated-method-assertEquals";
url = "https://github.com/sdgathman/pymilter/pull/57.patch";
hash = "sha256-/5LlDR15nMR3l7rkVjT3w4FbDTFAAgNdERWlPNL2TVg=";
})
];
preBuild = '' preBuild = ''
sed -i 's/import thread/import _thread as thread/' Milter/greylist.py sed -i 's/import thread/import _thread as thread/' Milter/greylist.py