From c60195e154f14fadf9e209d768163814770eb689 Mon Sep 17 00:00:00 2001 From: natsukium Date: Fri, 30 Jun 2023 13:09:55 +0900 Subject: [PATCH 1/2] python310Packages.qudida: init at 0.0.4 --- .../python-modules/qudida/default.nix | 50 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/development/python-modules/qudida/default.nix diff --git a/pkgs/development/python-modules/qudida/default.nix b/pkgs/development/python-modules/qudida/default.nix new file mode 100644 index 000000000000..48d83c4d14ee --- /dev/null +++ b/pkgs/development/python-modules/qudida/default.nix @@ -0,0 +1,50 @@ +{ lib +, buildPythonPackage +, fetchPypi +, numpy +, opencv4 +, pythonOlder +, pythonRelaxDepsHook +, scikit-learn +, typing-extensions +}: + +buildPythonPackage rec { + pname = "qudida"; + version = "0.0.4"; + format = "setuptools"; + + disabled = pythonOlder "3.5"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-2xmOKIerDJqgAj5WWvv/Qd+3azYfhf1eE/eA11uhjMg="; + }; + + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + pythonRemoveDeps = [ + "opencv-python" + ]; + + propagatedBuildInputs = [ + numpy + opencv4 + scikit-learn + typing-extensions + ]; + + # upstream has no tests + doCheck = false; + + pythonImportsCheck = [ "qudida" ]; + + meta = with lib; { + description = "QUick and DIrty Domain Adaptation"; + homepage = "https://github.com/arsenyinfo/qudida"; + license = licenses.mit; + maintainers = with maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ad48d07ba5d8..25791f97e2df 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10478,6 +10478,8 @@ self: super: with self; { quart-cors = callPackage ../development/python-modules/quart-cors { }; + qudida = callPackage ../development/python-modules/qudida { }; + querystring_parser = callPackage ../development/python-modules/querystring-parser { }; questionary = callPackage ../development/python-modules/questionary { }; From 9d8609e1b9c401e7c1e141a9c16cadc62f1729e2 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 1 Jul 2023 10:59:31 +0900 Subject: [PATCH 2/2] python310Packages.albumentations: init at 1.3.1 --- .../python-modules/albumentations/default.nix | 62 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 64 insertions(+) create mode 100644 pkgs/development/python-modules/albumentations/default.nix diff --git a/pkgs/development/python-modules/albumentations/default.nix b/pkgs/development/python-modules/albumentations/default.nix new file mode 100644 index 000000000000..e2104641b78d --- /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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 25791f97e2df..3b1144c8815c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -406,6 +406,8 @@ self: super: with self; { alarmdecoder = callPackage ../development/python-modules/alarmdecoder { }; + albumentations = callPackage ../development/python-modules/albumentations { }; + ale-py = callPackage ../development/python-modules/ale-py { }; alectryon = callPackage ../development/python-modules/alectryon { };