1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 numpy,
6 six,
7 scipy,
8 pillow,
9 pytest,
10 keras,
11}:
12
13buildPythonPackage rec {
14 pname = "keras-preprocessing";
15 version = "1.1.2";
16
17 src = fetchPypi {
18 pname = "Keras_Preprocessing";
19 inherit version;
20 sha256 = "add82567c50c8bc648c14195bf544a5ce7c1f76761536956c3d2978970179ef3";
21 };
22
23 propagatedBuildInputs = [
24 # required
25 numpy
26 six
27 # optional
28 scipy
29 pillow
30 ];
31
32 nativeCheckInputs = [
33 pytest
34 keras
35 ];
36
37 checkPhase = ''
38 py.test tests/
39 '';
40
41 # Cyclic dependency: keras-preprocessing's tests require Keras, which requires keras-preprocessing
42 doCheck = false;
43
44 meta = with lib; {
45 description = "Easy data preprocessing and data augmentation for deep learning models";
46 homepage = "https://github.com/keras-team/keras-preprocessing";
47 license = licenses.mit;
48 };
49}