Files
nixpkgs/pkgs/development/python-modules/highdicom/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

76 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
numpy,
pillow,
pydicom,
pyjpegls,
pylibjpeg,
pylibjpeg-libjpeg,
pylibjpeg-openjpeg,
setuptools,
typing-extensions,
}:
buildPythonPackage rec {
pname = "highdicom";
version = "0.27.0";
pyproject = true;
src = fetchFromGitHub {
owner = "MGHComputationalPathology";
repo = "highdicom";
tag = "v${version}";
hash = "sha256-Tfy7u5MVapRE24CZLFzTnYChnH9JJ9V7FuUhDoktBFc=";
};
build-system = [
setuptools
];
dependencies = [
numpy
pillow
pydicom
pyjpegls
typing-extensions
];
optional-dependencies = {
libjpeg = [
pylibjpeg
pylibjpeg-libjpeg
pylibjpeg-openjpeg
];
};
nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.libjpeg;
preCheck = ''
export HOME=$TMP/test-home
mkdir -p $HOME/.pydicom/
ln -s ${pydicom.passthru.pydicom-data}/data_store/data $HOME/.pydicom/data
'';
pythonImportsCheck = [
"highdicom"
"highdicom.legacy"
"highdicom.ann"
"highdicom.ko"
"highdicom.pm"
"highdicom.pr"
"highdicom.seg"
"highdicom.sr"
"highdicom.sc"
];
meta = {
description = "High-level DICOM abstractions for Python";
homepage = "https://highdicom.readthedocs.io";
changelog = "https://github.com/ImagingDataCommons/highdicom/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ bcdarwin ];
};
}