From 8798f2c09aaba37d178767e58163d00c4d36707f Mon Sep 17 00:00:00 2001 From: ishiy Date: Fri, 29 Jan 2021 00:19:35 +0900 Subject: [PATCH 1/2] python3Packages.chainer: 6.5.0 -> 7.7.0 --- pkgs/development/python-modules/chainer/default.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/chainer/default.nix b/pkgs/development/python-modules/chainer/default.nix index 0c3b7a946fcd..ef218b615b9e 100644 --- a/pkgs/development/python-modules/chainer/default.nix +++ b/pkgs/development/python-modules/chainer/default.nix @@ -5,7 +5,7 @@ buildPythonPackage rec { pname = "chainer"; - version = "6.5.0"; + version = "7.7.0"; disabled = !isPy3k; # python2.7 abandoned upstream # no tests in Pypi tarball @@ -13,14 +13,9 @@ buildPythonPackage rec { owner = "chainer"; repo = "chainer"; rev = "v${version}"; - sha256 = "0ha9fbl6sa3fbnsz3y1pg335iiskdbxw838m5j06zgzy156zna1x"; + sha256 = "0m97k5bv4pcp5rvbczvrr2vxddwzw2h42cm021f5y779jx5ghclh"; }; - # remove on 7.0 or 6.6 release - postPatch = '' - sed -i '/typing/d' setup.py - ''; - checkInputs = [ pytest mock @@ -35,7 +30,7 @@ buildPythonPackage rec { # avoid gpu tests checkPhase = '' - pytest tests/chainer_tests/utils_tests -k 'not gpu and not cupy' + pytest tests/chainer_tests/utils_tests -k 'not gpu and not cupy and not ideep' ''; meta = with lib; { From c355637b4f182379eb9ffa3d9c492d3fb0b2dd74 Mon Sep 17 00:00:00 2001 From: ishiy Date: Fri, 29 Jan 2021 01:28:25 +0900 Subject: [PATCH 2/2] python3Packages.chainer: refactor pytest --- .../python-modules/chainer/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/chainer/default.nix b/pkgs/development/python-modules/chainer/default.nix index ef218b615b9e..9dd656efa88b 100644 --- a/pkgs/development/python-modules/chainer/default.nix +++ b/pkgs/development/python-modules/chainer/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchFromGitHub, isPy3k -, filelock, protobuf, numpy, pytest, mock, typing-extensions +, filelock, protobuf, numpy, pytestCheckHook, mock, typing-extensions , cupy, cudaSupport ? false }: @@ -17,7 +17,7 @@ buildPythonPackage rec { }; checkInputs = [ - pytest + pytestCheckHook mock ]; @@ -28,10 +28,13 @@ buildPythonPackage rec { typing-extensions ] ++ lib.optionals cudaSupport [ cupy ]; - # avoid gpu tests - checkPhase = '' - pytest tests/chainer_tests/utils_tests -k 'not gpu and not cupy and not ideep' - ''; + pytestFlagsArray = [ "tests/chainer_tests/utils_tests" ]; + + disabledTests = [ + "gpu" + "cupy" + "ideep" + ]; meta = with lib; { description = "A flexible framework of neural networks for deep learning";