From 4a72ca113584502cc92e33470e70797945e342b9 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 5 May 2019 16:14:24 +0100 Subject: [PATCH] pythonPackages.worldengine: fix tests by moving nose to checkInputs also only perform nosetests in py<3.5 --- pkgs/development/python-modules/worldengine/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/worldengine/default.nix b/pkgs/development/python-modules/worldengine/default.nix index cdb60946079..103e2fc8def 100644 --- a/pkgs/development/python-modules/worldengine/default.nix +++ b/pkgs/development/python-modules/worldengine/default.nix @@ -1,5 +1,6 @@ { stdenv , buildPythonPackage +, pythonOlder , fetchFromGitHub , nose , noise @@ -33,7 +34,6 @@ buildPythonPackage rec { ln -s ${src-data} worldengine-data ''; - buildInputs = [ nose ]; propagatedBuildInputs = [ noise numpy pyplatec protobuf purepng h5py gdal ]; prePatch = '' @@ -46,9 +46,10 @@ buildPythonPackage rec { --replace 'PyPlatec==1.4.0' 'PyPlatec' \ ''; - doCheck = true; - - postCheck = '' + # with python<3.5, unittest fails to discover tests because of their filenames + # so nose is used instead. + checkInputs = stdenv.lib.optional (pythonOlder "3.5") [ nose ]; + postCheck = stdenv.lib.optionalString (pythonOlder "3.5") '' nosetests tests '';