python311Packages.pypng,python312Packages.pypng: fix test imports and PATH

This commit is contained in:
Raghav Sood 2024-05-18 01:08:05 +08:00
parent 27851edc9d
commit 34273406be
No known key found for this signature in database
GPG Key ID: 13D53E9EB65DE19C
2 changed files with 24 additions and 1 deletions

View File

@ -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 ];

View File

@ -0,0 +1,12 @@
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