diff --git a/pkgs/development/python-modules/chainer/default.nix b/pkgs/development/python-modules/chainer/default.nix index 55a316ceab99..9de7f2ad5e92 100644 --- a/pkgs/development/python-modules/chainer/default.nix +++ b/pkgs/development/python-modules/chainer/default.nix @@ -1,33 +1,51 @@ -{ config, lib, buildPythonPackage, fetchFromGitHub, isPy3k -, filelock, protobuf, numpy, pytestCheckHook, mock, typing-extensions -, cupy, cudaSupport ? config.cudaSupport or false +{ lib +, buildPythonPackage +, config +, cudaSupport ? config.cudaSupport or false +, cupy +, fetchFromGitHub +, filelock +, mock +, numpy +, protobuf +, pytestCheckHook +, pythonOlder +, six +, typing-extensions }: buildPythonPackage rec { pname = "chainer"; version = "7.8.1.post1"; - disabled = !isPy3k; # python2.7 abandoned upstream + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "chainer"; repo = "chainer"; rev = "refs/tags/v${version}"; - sha256 = "sha256-epwnExmyCWmwaOz+mJnAl1peEeHLBdQGC62BlLfSTQQ="; + hash = "sha256-epwnExmyCWmwaOz+mJnAl1peEeHLBdQGC62BlLfSTQQ="; }; propagatedBuildInputs = [ filelock - protobuf numpy + protobuf + six typing-extensions - ] ++ lib.optionals cudaSupport [ cupy ]; - - checkInputs = [ - pytestCheckHook - mock + ] ++ lib.optionals cudaSupport [ + cupy ]; - pytestFlagsArray = [ "tests/chainer_tests/utils_tests" ]; + checkInputs = [ + mock + pytestCheckHook + ]; + + pytestFlagsArray = [ + "tests/chainer_tests/utils_tests" + ]; preCheck = '' # cf. https://github.com/chainer/chainer/issues/8621 @@ -43,6 +61,10 @@ buildPythonPackage rec { "ideep" ]; + pythonImportsCheck = [ + "chainer" + ]; + meta = with lib; { description = "A flexible framework of neural networks for deep learning"; homepage = "https://chainer.org/";