diff options
Diffstat (limited to 'pkgs/development/python-modules/jpylyzer/default.nix')
-rw-r--r-- | pkgs/development/python-modules/jpylyzer/default.nix | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/jpylyzer/default.nix b/pkgs/development/python-modules/jpylyzer/default.nix index bacd4f62ed3..9e31735242c 100644 --- a/pkgs/development/python-modules/jpylyzer/default.nix +++ b/pkgs/development/python-modules/jpylyzer/default.nix @@ -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/"; |