2019-01-17 19:25:35 +00:00
|
|
|
{ lib
|
2018-01-16 13:28:55 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2019-01-17 19:25:35 +00:00
|
|
|
, isPy3k
|
2018-01-16 13:28:55 +00:00
|
|
|
, numpy
|
|
|
|
, six
|
2019-01-17 19:25:35 +00:00
|
|
|
, bz2file
|
|
|
|
, nose
|
|
|
|
, mock
|
2018-01-16 13:28:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nibabel";
|
2019-01-17 15:13:02 +00:00
|
|
|
version = "2.3.3";
|
2018-01-16 13:28:55 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-01-17 15:13:02 +00:00
|
|
|
sha256 = "b6366634c65b04464e62f3a9a8df1faa172f780ed7f1af1c6818b3dc2f1202c3";
|
2018-01-16 13:28:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
six
|
2019-01-17 19:25:35 +00:00
|
|
|
] ++ lib.optional (!isPy3k) bz2file;
|
|
|
|
|
|
|
|
checkInputs = [ nose mock ];
|
2018-01-16 13:28:55 +00:00
|
|
|
|
2019-01-17 19:25:35 +00:00
|
|
|
checkPhase = let
|
|
|
|
excludeTests = lib.optionals isPy3k [
|
|
|
|
# https://github.com/nipy/nibabel/issues/691
|
|
|
|
"nibabel.gifti.tests.test_giftiio.test_read_deprecated"
|
|
|
|
"nibabel.gifti.tests.test_parse_gifti_fast.test_parse_dataarrays"
|
|
|
|
"nibabel.tests.test_minc1.test_old_namespace"
|
|
|
|
];
|
|
|
|
# TODO: Add --with-doctest once all doctests pass
|
|
|
|
in ''
|
|
|
|
nosetests ${lib.concatMapStrings (test: "-e '${test}' ") excludeTests}
|
|
|
|
'';
|
2018-01-16 13:28:55 +00:00
|
|
|
|
2019-01-17 19:25:35 +00:00
|
|
|
meta = with lib; {
|
2018-01-16 13:28:55 +00:00
|
|
|
homepage = http://nipy.org/nibabel/;
|
|
|
|
description = "Access a multitude of neuroimaging data formats";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ashgillman ];
|
|
|
|
};
|
|
|
|
}
|