Merge pull request #111021 from ishiy1993/fix-chainer

This commit is contained in:
Sandro 2021-01-29 02:20:01 +01:00 committed by GitHub
commit da8a3c3c2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,11 +1,11 @@
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k { lib, buildPythonPackage, fetchFromGitHub, isPy3k
, filelock, protobuf, numpy, pytest, mock, typing-extensions , filelock, protobuf, numpy, pytestCheckHook, mock, typing-extensions
, cupy, cudaSupport ? false , cupy, cudaSupport ? false
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "chainer"; pname = "chainer";
version = "6.5.0"; version = "7.7.0";
disabled = !isPy3k; # python2.7 abandoned upstream disabled = !isPy3k; # python2.7 abandoned upstream
# no tests in Pypi tarball # no tests in Pypi tarball
@ -13,16 +13,11 @@ buildPythonPackage rec {
owner = "chainer"; owner = "chainer";
repo = "chainer"; repo = "chainer";
rev = "v${version}"; rev = "v${version}";
sha256 = "0ha9fbl6sa3fbnsz3y1pg335iiskdbxw838m5j06zgzy156zna1x"; sha256 = "0m97k5bv4pcp5rvbczvrr2vxddwzw2h42cm021f5y779jx5ghclh";
}; };
# remove on 7.0 or 6.6 release
postPatch = ''
sed -i '/typing/d' setup.py
'';
checkInputs = [ checkInputs = [
pytest pytestCheckHook
mock mock
]; ];
@ -33,10 +28,13 @@ buildPythonPackage rec {
typing-extensions typing-extensions
] ++ lib.optionals cudaSupport [ cupy ]; ] ++ lib.optionals cudaSupport [ cupy ];
# avoid gpu tests pytestFlagsArray = [ "tests/chainer_tests/utils_tests" ];
checkPhase = ''
pytest tests/chainer_tests/utils_tests -k 'not gpu and not cupy' disabledTests = [
''; "gpu"
"cupy"
"ideep"
];
meta = with lib; { meta = with lib; {
description = "A flexible framework of neural networks for deep learning"; description = "A flexible framework of neural networks for deep learning";