2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
config,
|
|
|
|
cudaSupport ? config.cudaSupport,
|
|
|
|
cupy,
|
|
|
|
fetchFromGitHub,
|
|
|
|
filelock,
|
|
|
|
mock,
|
|
|
|
numpy,
|
|
|
|
protobuf,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
six,
|
|
|
|
typing-extensions,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "chainer";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "7.8.1.post1";
|
2022-11-04 12:27:35 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chainer";
|
|
|
|
repo = "chainer";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-11-04 12:27:35 +00:00
|
|
|
hash = "sha256-epwnExmyCWmwaOz+mJnAl1peEeHLBdQGC62BlLfSTQQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
filelock
|
|
|
|
numpy
|
2022-11-04 12:27:35 +00:00
|
|
|
protobuf
|
|
|
|
six
|
2020-04-24 23:36:52 +00:00
|
|
|
typing-extensions
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals cudaSupport [ cupy ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
mock
|
2022-11-04 12:27:35 +00:00
|
|
|
pytestCheckHook
|
2022-05-18 14:49:53 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "tests/chainer_tests/utils_tests" ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
preCheck = ''
|
|
|
|
# cf. https://github.com/chainer/chainer/issues/8621
|
|
|
|
export CHAINER_WARN_VERSION_MISMATCH=0
|
|
|
|
|
|
|
|
# ignore pytest warnings not listed
|
|
|
|
rm setup.cfg
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
"gpu"
|
|
|
|
"cupy"
|
|
|
|
"ideep"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "chainer" ];
|
2022-11-04 12:27:35 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Flexible framework of neural networks for deep learning";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://chainer.org/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hyphon81 ];
|
|
|
|
};
|
|
|
|
}
|