Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, config 4, cudaSupport ? config.cudaSupport or false 5, cupy 6, fetchFromGitHub 7, filelock 8, mock 9, numpy 10, protobuf 11, pytestCheckHook 12, pythonOlder 13, six 14, typing-extensions 15}: 16 17buildPythonPackage rec { 18 pname = "chainer"; 19 version = "7.8.1.post1"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchFromGitHub { 25 owner = "chainer"; 26 repo = "chainer"; 27 rev = "refs/tags/v${version}"; 28 hash = "sha256-epwnExmyCWmwaOz+mJnAl1peEeHLBdQGC62BlLfSTQQ="; 29 }; 30 31 propagatedBuildInputs = [ 32 filelock 33 numpy 34 protobuf 35 six 36 typing-extensions 37 ] ++ lib.optionals cudaSupport [ 38 cupy 39 ]; 40 41 nativeCheckInputs = [ 42 mock 43 pytestCheckHook 44 ]; 45 46 pytestFlagsArray = [ 47 "tests/chainer_tests/utils_tests" 48 ]; 49 50 preCheck = '' 51 # cf. https://github.com/chainer/chainer/issues/8621 52 export CHAINER_WARN_VERSION_MISMATCH=0 53 54 # ignore pytest warnings not listed 55 rm setup.cfg 56 ''; 57 58 disabledTests = [ 59 "gpu" 60 "cupy" 61 "ideep" 62 ]; 63 64 pythonImportsCheck = [ 65 "chainer" 66 ]; 67 68 meta = with lib; { 69 description = "A flexible framework of neural networks for deep learning"; 70 homepage = "https://chainer.org/"; 71 license = licenses.mit; 72 maintainers = with maintainers; [ hyphon81 ]; 73 }; 74}