about summary refs log tree commit diff
path: root/pkgs/development/python-modules/albumentations/default.nix
diff options
context:
space:
mode:
authornatsukium <tomoya.otabi@gmail.com>2023-07-01 10:59:31 +0900
committernatsukium <tomoya.otabi@gmail.com>2023-07-11 12:35:11 +0900
commit9d8609e1b9c401e7c1e141a9c16cadc62f1729e2 (patch)
tree785de07877fc4268c6e83bee1a5faaaed0df4290 /pkgs/development/python-modules/albumentations/default.nix
parentc60195e154f14fadf9e209d768163814770eb689 (diff)
python310Packages.albumentations: init at 1.3.1
Diffstat (limited to 'pkgs/development/python-modules/albumentations/default.nix')
-rw-r--r--pkgs/development/python-modules/albumentations/default.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/albumentations/default.nix b/pkgs/development/python-modules/albumentations/default.nix
new file mode 100644
index 0000000000000..e2104641b78d3
--- /dev/null
+++ b/pkgs/development/python-modules/albumentations/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, numpy
+, opencv4
+, pyyaml
+, qudida
+, scikit-image
+, scipy
+, pytestCheckHook
+, pythonOlder
+, pythonRelaxDepsHook
+}:
+
+buildPythonPackage rec {
+  pname = "albumentations";
+  version = "1.3.1";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-pqODiP5UbFaAcejIL0FEmOhsntA8CLWOeoizHPeiRMY=";
+  };
+
+  nativeBuildInputs = [
+    pythonRelaxDepsHook
+  ];
+
+  pythonRemoveDeps = [
+    "opencv-python"
+  ];
+
+  propagatedBuildInputs = [
+    numpy
+    opencv4
+    pyyaml
+    qudida
+    scikit-image
+    scipy
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  disabledTests = [
+    # this test hangs up
+    "test_transforms"
+  ];
+
+  pythonImportsCheck = [ "albumentations" ];
+
+  meta = with lib; {
+    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 = licenses.mit;
+    maintainers = with maintainers; [ natsukium ];
+  };
+}