Files
nixpkgs/pkgs/development/python-modules/albumentations/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

93 lines
1.6 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
albucore,
numpy,
opencv-python,
pydantic,
pyyaml,
scipy,
# optional dependencies
huggingface-hub,
pillow,
torch,
# tests
deepdiff,
pytestCheckHook,
pytest-mock,
scikit-image,
scikit-learn,
torchvision,
}:
buildPythonPackage rec {
pname = "albumentations";
version = "2.0.8";
pyproject = true;
src = fetchFromGitHub {
owner = "albumentations-team";
repo = "albumentations";
tag = version;
hash = "sha256-8vUipdkIelRtKwMw63oUBDN/GUI0gegMGQaqDyXAOTQ=";
};
patches = [
./dont-check-for-updates.patch
];
pythonRelaxDeps = [ "opencv-python" ];
build-system = [ setuptools ];
dependencies = [
albucore
numpy
opencv-python
pydantic
pyyaml
scipy
];
optional-dependencies = {
hub = [ huggingface-hub ];
pytorch = [ torch ];
text = [ pillow ];
};
nativeCheckInputs = [
deepdiff
pytestCheckHook
pytest-mock
scikit-image
scikit-learn
torch
torchvision
];
disabledTests = [
"test_pca_inverse_transform"
# these tests hang
"test_keypoint_remap_methods"
"test_multiprocessing_support"
];
pythonImportsCheck = [ "albumentations" ];
meta = {
description = "Fast image augmentation library and easy to use wrapper around other libraries";
homepage = "https://github.com/albumentations-team/albumentations";
changelog = "https://github.com/albumentations-team/albumentations/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
};
}