@@ -1,24 +1,32 @@
1−{ lib, buildPythonPackage, fetchPypi, numpy, scipy, six }:
1+{ lib, buildPythonPackage, fetchPypi, numpy, six, scipy, pillow, pytest, Keras }:
22
33buildPythonPackage rec {
44 pname = "Keras_Preprocessing";
5− version = "1.0.5";
5+ version = "1.0.8";
66
77 src = fetchPypi {
88 inherit pname version;
9− sha256 = "ef2e482c4336fcf7180244d06f4374939099daa3183816e82aee7755af35b754";
9+ sha256 = "6e669aa713727f0bc08f756616f64e0dfa75d822226cfc0dcf33297ab05cef7d";
1010 };
1111
12− # Cyclic dependency: keras-preprocessing requires keras, which requires keras-preprocessing
13− postPatch = ''
14− sed -i "s/keras>=[^']*//" setup.py
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/
1525 '';
1626
17− # No tests in PyPI tarball
27+ # Cyclic dependency: keras-preprocessing's tests require Keras, which requires keras-preprocessing
1828 doCheck = false;
1929
20− propagatedBuildInputs = [ numpy scipy six ];
21−
2230 meta = with lib; {
2331 description = "Easy data preprocessing and data augmentation for deep learning models";
2432 homepage = https://github.com/keras-team/keras-preprocessing;