Merge pull request #205846 from risicle/ris-jpylyzer-full-check

This commit is contained in:
Sandro
2023-01-24 00:12:36 +01:00
committed by GitHub
@@ -5,6 +5,10 @@
, six
, lxml
, pytestCheckHook
, doFullCheck ? false # weird filenames cause issues on some filesystems
# for passthru.tests
, jpylyzer
}:
let
@@ -33,12 +37,12 @@ in buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook lxml ];
# don't depend on testFiles on darwin as it may not be extractable due to
# weird filenames
preCheck = lib.optionalString (!stdenv.isDarwin) ''
# don't depend on testFiles unless doFullCheck as it may not be extractable
# on some filesystems due to weird filenames
preCheck = lib.optionalString doFullCheck ''
sed -i '/^testFilesDir = /ctestFilesDir = "${testFiles}"' tests/unit/test_testfiles.py
'';
disabledTestPaths = lib.optionals stdenv.isDarwin [
disabledTestPaths = lib.optionals (!doFullCheck) [
"tests/unit/test_testfiles.py"
];
@@ -46,6 +50,10 @@ in buildPythonPackage rec {
disallowedReferences = [ testFiles ];
passthru.tests = {
withFullCheck = jpylyzer.override { doFullCheck = true; };
};
meta = with lib; {
description = "JP2 (JPEG 2000 Part 1) image validator and properties extractor";
homepage = "https://jpylyzer.openpreservation.org/";