From 632043a5bb44d64a57294e15e5f06c1090d57b02 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Thu, 28 Apr 2022 17:42:40 +0300 Subject: [PATCH 1/2] python3Packages.chainer: rm cupy warning --- pkgs/development/python-modules/chainer/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/chainer/default.nix b/pkgs/development/python-modules/chainer/default.nix index 1b40d506abc..af707893f6b 100644 --- a/pkgs/development/python-modules/chainer/default.nix +++ b/pkgs/development/python-modules/chainer/default.nix @@ -16,6 +16,10 @@ buildPythonPackage rec { sha256 = "1n07zjzc4g92m1sbgxvnansl0z00y4jnhma2mw06vnahs7s9nrf6"; }; + postPatch = '' + substituteInPlace chainer/_version.py --replace ",<8.0.0" "" + ''; + checkInputs = [ pytestCheckHook mock @@ -39,8 +43,6 @@ buildPythonPackage rec { meta = with lib; { description = "A flexible framework of neural networks for deep learning"; homepage = "https://chainer.org/"; - # Un-break me when updating chainer next time! - broken = cudaSupport && (lib.versionAtLeast cupy.version "8.0.0"); license = licenses.mit; maintainers = with maintainers; [ hyphon81 ]; }; From acc0931de1f5420bbb0c73d1cc816a6e254b1c79 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Thu, 28 Apr 2022 17:47:50 +0300 Subject: [PATCH 2/2] python3Packages: restore warning, but fix tests --- pkgs/development/python-modules/chainer/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/chainer/default.nix b/pkgs/development/python-modules/chainer/default.nix index af707893f6b..79260173c54 100644 --- a/pkgs/development/python-modules/chainer/default.nix +++ b/pkgs/development/python-modules/chainer/default.nix @@ -16,10 +16,6 @@ buildPythonPackage rec { sha256 = "1n07zjzc4g92m1sbgxvnansl0z00y4jnhma2mw06vnahs7s9nrf6"; }; - postPatch = '' - substituteInPlace chainer/_version.py --replace ",<8.0.0" "" - ''; - checkInputs = [ pytestCheckHook mock @@ -34,6 +30,11 @@ buildPythonPackage rec { pytestFlagsArray = [ "tests/chainer_tests/utils_tests" ]; + # cf. https://github.com/chainer/chainer/issues/8621 + preCheck = '' + export CHAINER_WARN_VERSION_MISMATCH=0 + ''; + disabledTests = [ "gpu" "cupy"