about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRenaud <c0bw3b@users.noreply.github.com>2019-05-07 16:16:16 +0200
committerGitHub <noreply@github.com>2019-05-07 16:16:16 +0200
commitacba81716128fe7638798662371bdaebdd600805 (patch)
tree5a216ffce8f20d00e806a7875b2f76e815119ce1 /pkgs
parentd51e32404ca5aa43868a265c5f9425a63418118a (diff)
parent4a72ca113584502cc92e33470e70797945e342b9 (diff)
downloadnixlib-acba81716128fe7638798662371bdaebdd600805.tar
nixlib-acba81716128fe7638798662371bdaebdd600805.tar.gz
nixlib-acba81716128fe7638798662371bdaebdd600805.tar.bz2
nixlib-acba81716128fe7638798662371bdaebdd600805.tar.lz
nixlib-acba81716128fe7638798662371bdaebdd600805.tar.xz
nixlib-acba81716128fe7638798662371bdaebdd600805.tar.zst
nixlib-acba81716128fe7638798662371bdaebdd600805.zip
Merge pull request #60998 from risicle/ris-worldengine-fix
pythonPackages.worldengine: fix tests by moving nose to checkInputs 
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/worldengine/default.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/worldengine/default.nix b/pkgs/development/python-modules/worldengine/default.nix
index cdb60946079d..103e2fc8defd 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
   '';