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

Merge pull request #312485 from RaghavSood/pypng/fix-darwin-build

python311Packages.pypng,python312Packages.pypng: fix test scripts
parents c21d10ba 34273406
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -21,7 +21,18 @@ buildPythonPackage rec {
    setuptools
  ];

  pythonImportsCheck = [ "png" ];
  patches = [
    # pngsuite is imported by code/test_png.py but is not defined in
    # setup.cfg, so it isn't built - this adds it to py_modules
    ./setup-cfg-pngsuite.patch
  ];

  # allow tests to use the binaries produced by this package
  preCheck = ''
    export PATH="$out/bin:$PATH"
  '';

  pythonImportsCheck = [ "png" "pngsuite" ];

  nativeCheckInputs = [ pytestCheckHook ];

+12 −0
Original line number Diff line number Diff line
diff --git a/setup.cfg b/setup.cfg
index 04bba8a..db159d2 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -28,6 +28,7 @@ package_dir =
        = code
 py_modules =
     png
+    pngsuite
 scripts =
     code/prichunkpng
     code/pricolpng