diff options
author | Chris Ostrouchov <chris.ostrouchov@gmail.com> | 2018-10-17 01:00:46 -0400 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2018-10-18 11:02:23 +0200 |
commit | 5f03c01b358c8ff30927bf33c56305ca67b6dab1 (patch) | |
tree | 73788f62e4062cd5bc7dd007b589b54b0f74d567 | |
parent | 8d7f629fb46d8d899a046e21d7a679667af335f8 (diff) | |
download | nixlib-5f03c01b358c8ff30927bf33c56305ca67b6dab1.tar nixlib-5f03c01b358c8ff30927bf33c56305ca67b6dab1.tar.gz nixlib-5f03c01b358c8ff30927bf33c56305ca67b6dab1.tar.bz2 nixlib-5f03c01b358c8ff30927bf33c56305ca67b6dab1.tar.lz nixlib-5f03c01b358c8ff30927bf33c56305ca67b6dab1.tar.xz nixlib-5f03c01b358c8ff30927bf33c56305ca67b6dab1.tar.zst nixlib-5f03c01b358c8ff30927bf33c56305ca67b6dab1.zip |
pythonPackages.nipy: refactor move to python-modules
-rw-r--r-- | pkgs/development/python-modules/nipy/default.nix | 49 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 43 |
2 files changed, 50 insertions, 42 deletions
diff --git a/pkgs/development/python-modules/nipy/default.nix b/pkgs/development/python-modules/nipy/default.nix new file mode 100644 index 000000000000..8ff7bbe24167 --- /dev/null +++ b/pkgs/development/python-modules/nipy/default.nix @@ -0,0 +1,49 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, pythonOlder +, nose +, matplotlib +, nibabel +, numpy +, scipy +, sympy +, python +}: + +buildPythonPackage rec { + version = "0.4.0"; + pname = "nipy"; + disabled = pythonOlder "2.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "1hnbn2i4fjxflaaz082s2c57hfp59jfra1zayz1iras5p2dy21nr"; + }; + + buildInputs = stdenv.lib.optional doCheck [ nose ]; + propagatedBuildInputs = [ matplotlib nibabel numpy scipy sympy ]; + + checkPhase = '' # wants to be run in a different directory + mkdir nosetests + cd nosetests + ${python.interpreter} -c "import nipy; nipy.test()" + rm -rf . + ''; + + # failing test: + # nipy.algorithms.statistics.models.tests.test_olsR.test_results(11.593139639404727, 11.593140144880794, 6) # disagrees by 1 at 6th decimal place + # erroring tests: + # nipy.modalities.fmri.fmristat.tests.test_FIAC.test_altprotocol + # nipy.modalities.fmri.fmristat.tests.test_FIAC.test_agreement + # nipy.tests.test_scripts.test_nipy_4d_realign # because `nipy_4d_realign` script isn't found at test time; works from nix-shell, so could be patched + # nipy.tests.test_scripts.test_nipy_3_4d # ditto re.: `nipy_3_4d` script + doCheck = false; + + meta = with stdenv.lib; { + homepage = http://nipy.org/nipy/; + description = "Software for structural and functional neuroimaging analysis"; + license = licenses.bsd3; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bda244f33403..1c5156eab689 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2967,48 +2967,7 @@ in { nimfa = callPackage ../development/python-modules/nimfa {}; - nipy = buildPythonPackage rec { - version = "0.4.0"; - name = "nipy-${version}"; - - disabled = pythonOlder "2.6"; - - checkPhase = '' # wants to be run in a different directory - mkdir nosetests - cd nosetests - ${python.interpreter} -c "import nipy; nipy.test()" - rm -rf . - ''; - # failing test: - # nipy.algorithms.statistics.models.tests.test_olsR.test_results(11.593139639404727, 11.593140144880794, 6) # disagrees by 1 at 6th decimal place - # erroring tests: - # nipy.modalities.fmri.fmristat.tests.test_FIAC.test_altprotocol - # nipy.modalities.fmri.fmristat.tests.test_FIAC.test_agreement - # nipy.tests.test_scripts.test_nipy_4d_realign # because `nipy_4d_realign` script isn't found at test time; works from nix-shell, so could be patched - # nipy.tests.test_scripts.test_nipy_3_4d # ditto re.: `nipy_3_4d` script - doCheck = false; - - src = pkgs.fetchurl { - url = "mirror://pypi/n/nipy/${name}.tar.gz"; - sha256 = "1hnbn2i4fjxflaaz082s2c57hfp59jfra1zayz1iras5p2dy21nr"; - }; - - buildInputs = stdenv.lib.optional doCheck [ self.nose ]; - - propagatedBuildInputs = with self; [ - matplotlib - nibabel - numpy - scipy - sympy - ]; - - meta = { - homepage = http://nipy.org/nipy/; - description = "Software for structural and functional neuroimaging analysis"; - license = licenses.bsd3; - }; - }; + nipy = callPackage ../development/python-modules/nipy { }; nipype = callPackage ../development/python-modules/nipype { inherit (pkgs) which; |