diff options
Diffstat (limited to 'pkgs/development/python-modules/willow/default.nix')
-rw-r--r-- | pkgs/development/python-modules/willow/default.nix | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/willow/default.nix b/pkgs/development/python-modules/willow/default.nix index f7030f7c874..1787faa3890 100644 --- a/pkgs/development/python-modules/willow/default.nix +++ b/pkgs/development/python-modules/willow/default.nix @@ -1,34 +1,62 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , pythonOlder +# build-system +, flit-core + # dependencies , filetype -, defusedxml, +, defusedxml + +# optional-dependencies +, pillow-heif + +# tests +, numpy +, opencv4 +, pillow +, pytestCheckHook +, wand }: buildPythonPackage rec { pname = "willow"; - version = "1.5.1"; - format = "setuptools"; + version = "1.6.2"; + format = "pyproject"; disabled = pythonOlder "2.7"; - src = fetchPypi { - pname = "Willow"; - inherit version; - hash = "sha256-t6SQkRATP9seIodZLgZzzCVeAobhzVNCfuaN8ckiDEw="; + src = fetchFromGitHub { + owner = "wagtail"; + repo = "Willow"; + rev = "refs/tags/v${version}"; + hash = "sha256-dW2FVN3/mBAhVQ094uBsnXzdyTRKgHUDx0SWLm3g374="; }; + nativeBuildInputs = [ + flit-core + ]; + propagatedBuildInputs = [ filetype defusedxml ]; - # Test data is not included - # https://github.com/torchbox/Willow/issues/34 - doCheck = false; + 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"; |