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

python311Packages.pypng,python312Packages.pypng: fix test scripts
This commit is contained in:
Weijia Wang 2024-05-18 15:59:59 +02:00 committed by GitHub
commit cb7884d6de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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