Merge pull request #232737 from figsoda/purepng

python310Packages.purepng: fix build
This commit is contained in:
Weijia Wang 2023-05-19 12:27:53 +03:00 committed by GitHub
commit fabbfa8138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,17 +32,26 @@ 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; {
description = "Pure Python library for PNG image encoding/decoding";
homepage = "https://github.com/scondo/purepng";
license = licenses.mit;
homepage = "https://github.com/scondo/purepng";
license = licenses.mit;
maintainers = with maintainers; [ ris ];
};
}