@@ -1,5 +1,6 @@
11{ stdenv
22, buildPythonPackage
3+, pythonOlder
34, fetchFromGitHub
45, nose
56, noise
@@ -33,7 +34,6 @@ buildPythonPackage rec {
3334 ln -s ${src-data} worldengine-data
3435 '';
3536
36− buildInputs = [ nose ];
3737 propagatedBuildInputs = [ noise numpy pyplatec protobuf purepng h5py gdal ];
3838
3939 prePatch = ''
@@ -46,9 +46,10 @@ buildPythonPackage rec {
4646 --replace 'PyPlatec==1.4.0' 'PyPlatec' \
4747 '';
4848
49− doCheck = true;
50−
51− postCheck = ''
49+ # with python<3.5, unittest fails to discover tests because of their filenames
50+ # so nose is used instead.
51+ checkInputs = stdenv.lib.optional (pythonOlder "3.5") [ nose ];
52+ postCheck = stdenv.lib.optionalString (pythonOlder "3.5") ''
5253 nosetests tests
5354 '';
5455