nav: init at 1.2.1 (#356071)
[NixPkgs.git] / pkgs / development / python-modules / albumentations / default.nix
blob2d9ed2df4e38d1872b893c013d3fab2e9c842c47
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
7   # build-system
8   setuptools,
10   # dependencies
11   albucore,
12   eval-type-backport,
13   numpy,
14   opencv-python,
15   pydantic,
16   pyyaml,
17   scikit-image,
18   scipy,
20   # optional dependencies
21   huggingface-hub,
22   pillow,
24   # tests
25   deepdiff,
26   pytestCheckHook,
27   pytest-mock,
28   torch,
29   torchvision,
32 buildPythonPackage rec {
33   pname = "albumentations";
34   version = "1.4.22";
35   pyproject = true;
37   disabled = pythonOlder "3.9";
39   src = fetchFromGitHub {
40     owner = "albumentations-team";
41     repo = "albumentations";
42     rev = "refs/tags/${version}";
43     hash = "sha256-kRf8LhRWtzGnhPrQo5aT/4a2sNQCdwAmFFzwcE0QnxM=";
44   };
46   patches = [
47     ./dont-check-for-updates.patch
48   ];
50   pythonRelaxDeps = [ "opencv-python" ];
52   build-system = [ setuptools ];
54   dependencies = [
55     albucore
56     eval-type-backport
57     numpy
58     opencv-python
59     pydantic
60     pyyaml
61     scikit-image
62     scipy
63   ];
65   optional-dependencies = {
66     hub = [ huggingface-hub ];
67     text = [ pillow ];
68   };
70   nativeCheckInputs = [
71     deepdiff
72     pytestCheckHook
73     pytest-mock
74     torch
75     torchvision
76   ];
78   disabledTests = [
79     "test_pca_inverse_transform"
80     # this test hangs up
81     "test_transforms"
82   ];
84   pythonImportsCheck = [ "albumentations" ];
86   meta = {
87     description = "Fast image augmentation library and easy to use wrapper around other libraries";
88     homepage = "https://github.com/albumentations-team/albumentations";
89     changelog = "https://github.com/albumentations-team/albumentations/releases/tag/${version}";
90     license = lib.licenses.mit;
91     maintainers = with lib.maintainers; [ natsukium ];
92   };