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