Unverified Commit fabbfa81 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #232737 from figsoda/purepng

python310Packages.purepng: fix build
parents c5d526e7 6db453b3
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -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 ];
  };

}