git.iko.soy/typeable/nixpkgs
on master help sign in
torchvision: update reason why tests fails
commitd198cbabe7c6c78a1b161ee139e1debd6e5d6e92 authorJörg Thalheim <joerg@thalheim.io> dateWed 30 Dec 2020, 07:42 (6 years ago) parent77c70ab
1 file changed+8−6
pkgs/development/python-modules/torchvision/default.nix+8−6
pkgs/development/python-modules/torchvision/default.nix+8−6
@@ -9,7 +9,7 @@
99, scipy
1010, pillow
1111, pytorch
12−, pytestCheckHook
12+, pytest
1313}:
1414
1515buildPythonPackage rec {
@@ -25,19 +25,21 @@ buildPythonPackage rec {
2525
2626 nativeBuildInputs = [ libpng ninja which ];
2727
28− TORCHVISION_INCLUDE="${libjpeg_turbo.dev}/include/";
29− TORCHVISION_LIBRARY="${libjpeg_turbo}/lib/";
28+ TORCHVISION_INCLUDE = "${libjpeg_turbo.dev}/include/";
29+ TORCHVISION_LIBRARY = "${libjpeg_turbo}/lib/";
3030
3131 buildInputs = [ libjpeg_turbo libpng ];
3232
3333 propagatedBuildInputs = [ numpy pillow pytorch scipy ];
3434
35− # checks fail to import _C.so and various other failures
35+ # tries to download many datasets for tests
3636 doCheck = false;
3737
38− checkInputs = [ pytestCheckHook ];
38+ checkPhase = ''
39+ HOME=$TMPDIR py.test test --ignore=test/test_datasets_download.py
40+ '';
3941
40− pytestFlagsArray = [ "--ignore=test/test_datasets_download.py" ];
42+ checkInputs = [ pytest ];
4143
4244 meta = with stdenv.lib; {
4345 description = "PyTorch vision library";