depot/third_party/nixpkgs/pkgs/development/python-modules/willow/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

68 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
# build-system
, flit-core
# dependencies
, filetype
, defusedxml
# optional-dependencies
, pillow-heif
# tests
, numpy
, opencv4
, pillow
, pytestCheckHook
, wand
}:
buildPythonPackage rec {
pname = "willow";
version = "1.7.0";
format = "pyproject";
disabled = pythonOlder "2.7";
src = fetchFromGitHub {
owner = "wagtail";
repo = "Willow";
rev = "refs/tags/v${version}";
hash = "sha256-+ubylc/Zuw3DSSgtTg2dO3Zj0gpTJcLbb1J++caxS7w=";
};
nativeBuildInputs = [
flit-core
];
propagatedBuildInputs = [
filetype
defusedxml
];
passthru.optional-dependencies = {
heif = [
pillow-heif
];
};
nativeCheckInputs = [
numpy
opencv4
pytestCheckHook
pillow
wand
] ++ passthru.optional-dependencies.heif;
meta = with lib; {
description = "A Python image library that sits on top of Pillow, Wand and OpenCV";
homepage = "https://github.com/torchbox/Willow/";
license = licenses.bsd2;
maintainers = with maintainers; [ desiderius ];
};
}