python3Packages.facenet-pytorch: cleanup, fix (#537718)
This commit is contained in:
@@ -1,34 +1,50 @@
|
||||
{
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
pillow,
|
||||
torchvision,
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
setuptools,
|
||||
|
||||
# dependencies
|
||||
pillow,
|
||||
requests,
|
||||
torchvision,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "facenet-pytorch";
|
||||
version = "2.5.3";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-mMxbQqSPg3wCPrkvKlcc1KxqRmh8XnG56ZtJEIcnPis=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "timesler";
|
||||
repo = "facenet-pytorch";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-3YVyqKgVLD5aePwyVQA8kOiqx32kqg9lxU2uwPWGkCU=";
|
||||
};
|
||||
|
||||
doCheck = false; # pypi version doesn't ship with tests
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
pillow
|
||||
requests
|
||||
torchvision
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "facenet_pytorch" ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pillow
|
||||
torchvision
|
||||
];
|
||||
# The only tests require internet access
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Pretrained Pytorch face detection (MTCNN) and facial recognition (InceptionResnet) models";
|
||||
homepage = "https://github.com/timesler/facenet-pytorch";
|
||||
changelog = "https://github.com/timesler/facenet-pytorch/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user