From 05a7ac3b2afcbe8d5fb6b5492201b6c8b3fdcf0c Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Fri, 17 Apr 2020 00:55:38 -0400 Subject: [PATCH] python3Packages.mne-python: init at 0.21.2 --- .../python-modules/mne-python/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/mne-python/default.nix diff --git a/pkgs/development/python-modules/mne-python/default.nix b/pkgs/development/python-modules/mne-python/default.nix new file mode 100644 index 000000000000..84babe171897 --- /dev/null +++ b/pkgs/development/python-modules/mne-python/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy27 +, numpy +, scipy +, pytestCheckHook +, pytestcov +, pytest-timeout +, h5py +, matplotlib +, nibabel +, pandas +, scikitlearn +}: + +buildPythonPackage rec { + pname = "mne-python"; + version = "0.21.2"; + + disabled = isPy27; + + # PyPI dist insufficient to run tests + src = fetchFromGitHub { + owner = "mne-tools"; + repo = pname; + rev = "v${version}"; + sha256 = "18nfdbkffmxzkkbp3d4w8r2kfi0sxip3hy997d3mx6dy74jc7nmg"; + }; + + propagatedBuildInputs = [ numpy scipy ]; + + # all tests pass, but Pytest hangs afterwards - probably some thread hasn't terminated + doCheck = false; + checkInputs = [ + pytestCheckHook + pytestcov + pytest-timeout + h5py + matplotlib + nibabel + pandas + scikitlearn + ]; + preCheck = '' + export HOME=$TMP + export MNE_SKIP_TESTING_DATASET_TESTS=true + export MNE_SKIP_NETWORK_TESTS=1 + ''; + + pythonImportsCheck = [ "mne" ]; + + meta = with lib; { + homepage = "https://mne.tools"; + description = "Magnetoencephelography and electroencephalography in Python"; + license = licenses.bsd3; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ad09b13d6c7d..43c4ad00d216 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3813,6 +3813,8 @@ in { mnemonic = callPackage ../development/python-modules/mnemonic { }; + mne-python = callPackage ../development/python-modules/mne-python { }; + mnist = callPackage ../development/python-modules/mnist { }; mocket = callPackage ../development/python-modules/mocket { };