python310Packages.purepng: fix build

This commit is contained in:
figsoda 2023-05-18 22:52:39 -04:00
parent d6c1f83e99
commit 6db453b3c6

View file

@ -32,10 +32,20 @@ buildPythonPackage {
# numpy is optional - if not supplied, tests simply have less coverage
nativeCheckInputs = [ numpy ];
postPatch = ''
substituteInPlace code/test_png.py \
--replace numpy.bool bool
'';
# checkPhase begins by deleting source dir to force test execution against installed version
checkPhase = ''
runHook preCheck
rm -r code/png
${python.interpreter} code/test_png.py
runHook postCheck
'';
meta = with lib; {
@ -44,5 +54,4 @@ buildPythonPackage {
license = licenses.mit;
maintainers = with maintainers; [ ris ];
};
}