python313Packages.pydicom: add missing pydicom[pixeldata] optdepends

Also moved tests to passthru to break dependency cycle
This commit is contained in:
Ben Darwin
2025-10-31 19:08:56 -04:00
parent b315e9fb88
commit 569dba35bb
@@ -10,7 +10,9 @@
# optional/test dependencies
gdcm,
pillow,
pydicom,
pyjpegls,
pylibjpeg,
pylibjpeg-libjpeg,
writableTmpDirAsHomeHook,
}:
@@ -46,11 +48,12 @@ buildPythonPackage rec {
pixeldata = [
pillow
pyjpegls
#pylibjpeg.optional-dependencies.openjpeg # infinite recursion
#pylibjpeg.optional-dependencies.rle # infinite recursion
pylibjpeg
pylibjpeg-libjpeg
gdcm
];
]
++ pylibjpeg.optional-dependencies.openjpeg
++ pylibjpeg.optional-dependencies.rle;
};
nativeCheckInputs = [
@@ -61,6 +64,12 @@ buildPythonPackage rec {
passthru.pydicom-data = test_data;
doCheck = false; # circular dependency
passthru.tests.pytest = pydicom.overridePythonAttrs {
doCheck = true;
};
# Setting $HOME to prevent pytest to try to create a folder inside
# /homeless-shelter which is read-only.
# Linking pydicom-data dicom files to $HOME/.pydicom/data