python3Packages.mtcnn: init at 0.1.1

This commit is contained in:
Dennis Wuitz 2024-10-07 11:15:06 +02:00 committed by Dennis
parent bcae1ced2a
commit 6ed529c47c
2 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
opencv4,
pytestCheckHook,
pythonOlder,
setuptools,
tensorflow,
}:
buildPythonPackage {
pname = "mtcnn";
version = "0.1.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ipazc";
repo = "mtcnn";
# No tags / releases; using commit: https://github.com/ipazc/mtcnn/commit/3208d443a8f01d317c65d7c97a03bc0a6143c41d
rev = "3208d443a8f01d317c65d7c97a03bc0a6143c41d";
hash = "sha256-GXUrLJ5XD6V2hT/gjyYSuh/CMMw2xIXKBsYFvQmbLYs=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail "setup, setuptools" "setup, find_packages"\
--replace-fail "setuptools.find_packages" "find_packages"\
--replace-fail "opencv-python>=4.1.0" ""\
--replace-fail "keras>=2.0.0" ""\
--replace-fail "tests_require=['nose']," ""
'';
build-system = [ setuptools ];
dependencies = [
opencv4
tensorflow
];
pythonImportsCheck = [ "mtcnn" ];
nativeCheckInputs = [ pytestCheckHook ];
meta = {
description = "MTCNN face detection implementation for TensorFlow, as a PIP package";
homepage = "https://github.com/ipazc/mtcnn";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ derdennisop ];
};
}

View File

@ -8244,6 +8244,8 @@ self: super: with self; {
msrest = callPackage ../development/python-modules/msrest { };
mtcnn = callPackage ../development/python-modules/mtcnn { };
mt-940 = callPackage ../development/python-modules/mt-940 { };
mullvad-api = callPackage ../development/python-modules/mullvad-api { };