about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pypng/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pypng/default.nix')
-rw-r--r--pkgs/development/python-modules/pypng/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/pypng/default.nix b/pkgs/development/python-modules/pypng/default.nix
index ca47266e9dfc5..71882ee1f2eb0 100644
--- a/pkgs/development/python-modules/pypng/default.nix
+++ b/pkgs/development/python-modules/pypng/default.nix
@@ -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 ];