From 071c7e8d53ae6980c17eccea468ac1c59d03320e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 30 Jan 2019 14:05:26 +0100 Subject: [PATCH 1/2] python.pkgs.keras-preprocessing: 1.0.5 -> 1.0.8 --- .../keras-preprocessing/default.nix | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/keras-preprocessing/default.nix b/pkgs/development/python-modules/keras-preprocessing/default.nix index a57b6f7dfa38..9d6202337441 100644 --- a/pkgs/development/python-modules/keras-preprocessing/default.nix +++ b/pkgs/development/python-modules/keras-preprocessing/default.nix @@ -1,24 +1,32 @@ -{ lib, buildPythonPackage, fetchPypi, numpy, scipy, six }: +{ lib, buildPythonPackage, fetchPypi, numpy, six, scipy, pillow, pytest, Keras }: buildPythonPackage rec { pname = "Keras_Preprocessing"; - version = "1.0.5"; + version = "1.0.8"; src = fetchPypi { inherit pname version; - sha256 = "ef2e482c4336fcf7180244d06f4374939099daa3183816e82aee7755af35b754"; + sha256 = "6e669aa713727f0bc08f756616f64e0dfa75d822226cfc0dcf33297ab05cef7d"; }; - # Cyclic dependency: keras-preprocessing requires keras, which requires keras-preprocessing - postPatch = '' - sed -i "s/keras>=[^']*//" setup.py + propagatedBuildInputs = [ + # required + numpy six + # optional + scipy pillow + ]; + + checkInputs = [ + pytest Keras + ]; + + checkPhase = '' + py.test tests/ ''; - # No tests in PyPI tarball + # Cyclic dependency: keras-preprocessing's tests require Keras, which requires keras-preprocessing doCheck = false; - propagatedBuildInputs = [ numpy scipy six ]; - meta = with lib; { description = "Easy data preprocessing and data augmentation for deep learning models"; homepage = https://github.com/keras-team/keras-preprocessing; From 677f8c1e771161543e9cd0fd9101bd62c29787f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 30 Jan 2019 14:15:09 +0100 Subject: [PATCH 2/2] python.pkgs.Keras: remove obsolete postPatch phase --- pkgs/development/python-modules/keras/default.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkgs/development/python-modules/keras/default.nix b/pkgs/development/python-modules/keras/default.nix index 83ef23282797..dde820876d81 100644 --- a/pkgs/development/python-modules/keras/default.nix +++ b/pkgs/development/python-modules/keras/default.nix @@ -25,14 +25,6 @@ buildPythonPackage rec { keras-applications keras-preprocessing ]; - # Keras 2.2.2 expects older versions of keras_applications - # and keras_preprocessing. These substitutions can be removed - # for for the next Keras release. - postPatch = '' - substituteInPlace setup.py --replace "keras_applications==1.0.4" "keras_applications==1.0.5" - substituteInPlace setup.py --replace "keras_preprocessing==1.0.2" "keras_preprocessing==1.0.3" - ''; - # Couldn't get tests working doCheck = false;