From f5ac53a2b55e3d75ce3f2170c9412668aa7d1b84 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 29 Oct 2018 15:00:41 -0400 Subject: [PATCH] pythonPackage.willow: refactor move to python-modules --- .../python-modules/willow/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 24 +------------- 2 files changed, 33 insertions(+), 23 deletions(-) create mode 100644 pkgs/development/python-modules/willow/default.nix diff --git a/pkgs/development/python-modules/willow/default.nix b/pkgs/development/python-modules/willow/default.nix new file mode 100644 index 000000000000..88e6838cf930 --- /dev/null +++ b/pkgs/development/python-modules/willow/default.nix @@ -0,0 +1,32 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, pythonOlder +, six +, pillow +}: + +buildPythonPackage rec { + pname = "willow"; + version = "0.2.2"; + disabled = pythonOlder "2.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "111c82fbfcda2710ce6201b0b7e0cfa1ff3c4f2f0dc788cc8dfc8db933c39c73"; + }; + + propagatedBuildInputs = [ six pillow ]; + + # Test data is not included + # https://github.com/torchbox/Willow/issues/34 + doCheck = false; + + meta = with stdenv.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 ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cd1c39992051..ebaa54a5049a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4477,29 +4477,7 @@ in { ovh = callPackage ../development/python-modules/ovh { }; - willow = buildPythonPackage rec { - name = "willow-${version}"; - version = "0.2.2"; - disabled = pythonOlder "2.7"; - - src = pkgs.fetchurl { - url = "mirror://pypi/W/Willow/Willow-${version}.tar.gz"; - sha256 = "111c82fbfcda2710ce6201b0b7e0cfa1ff3c4f2f0dc788cc8dfc8db933c39c73"; - }; - - propagatedBuildInputs = with self; [ six pillow ]; - - # Test data is not included - # https://github.com/torchbox/Willow/issues/34 - doCheck = false; - - meta = { - 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 ]; - }; - }; + willow = callPackage ../development/python-modules/willow { }; importmagic = buildPythonPackage rec { simpleName = "importmagic";