depot/third_party/nixpkgs/pkgs/development/python-modules/albumentations/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

78 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
albucore,
eval-type-backport,
numpy,
opencv4,
pydantic,
pyyaml,
scikit-image,
scikit-learn,
deepdiff,
pytestCheckHook,
pytest-mock,
torch,
torchvision,
}:
buildPythonPackage rec {
pname = "albumentations";
version = "1.4.11";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "albumentations-team";
repo = "albumentations";
rev = "refs/tags/${version}";
hash = "sha256-1070V9+EZ4qrhxmbMyvTbu89pLoonrn0Peb8nwp2lwA=";
};
pythonRemoveDeps = [ "opencv-python" ];
build-system = [ setuptools ];
dependencies = [
albucore
eval-type-backport
numpy
opencv4
pydantic
pyyaml
scikit-image
scikit-learn
];
nativeCheckInputs = [
deepdiff
pytestCheckHook
pytest-mock
torch
torchvision
];
disabledTests = [
# this test hangs up
"test_transforms"
];
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/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
};
}