2017-05-01 11:20:13 +02:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, imagemagick
|
|
|
|
, pytest
|
|
|
|
, psutil
|
|
|
|
, memory_profiler
|
|
|
|
, pytest_xdist
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2017-09-12 21:36:41 +02:00
|
|
|
soext = stdenv.hostPlatform.extensions.sharedLibrary;
|
|
|
|
magick_wand_library = "${imagemagick}/lib/libMagickWand-6.Q16${soext}";
|
|
|
|
imagemagick_library = "${imagemagick}/lib/libMagickCore-6.Q16${soext}";
|
2017-05-01 11:20:13 +02:00
|
|
|
in buildPythonPackage rec {
|
|
|
|
pname = "Wand";
|
2019-01-27 12:37:41 +01:00
|
|
|
version = "0.5.0";
|
2017-05-01 11:20:13 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-01-27 12:37:41 +01:00
|
|
|
sha256 = "0rp1zdp2p7qngva5amcw4jb5i8gf569v8469gf6zj36hcnzksxjj";
|
2017-05-01 11:20:13 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ pytest pytest_xdist memory_profiler psutil ];
|
|
|
|
|
|
|
|
buildInputs = [ imagemagick ];
|
|
|
|
|
|
|
|
inherit magick_wand_library imagemagick_library;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteAllInPlace wand/api.py
|
|
|
|
'';
|
|
|
|
|
2018-12-02 13:52:42 +01:00
|
|
|
# tests not included with pypi release
|
2017-05-01 11:20:13 +02:00
|
|
|
doCheck = false;
|
2018-12-02 13:52:42 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-05-01 11:20:13 +02:00
|
|
|
description = "Ctypes-based simple MagickWand API binding for Python";
|
|
|
|
homepage = http://wand-py.org/;
|
2018-12-02 13:52:42 +01:00
|
|
|
license = [ licenses.mit ];
|
2017-05-01 11:20:13 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit imagemagick;
|
|
|
|
};
|
|
|
|
}
|