2020-12-09 12:39:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
|
|
|
, setuptools-scm
|
2020-12-09 12:39:15 +00:00
|
|
|
, numpy
|
|
|
|
, scipy
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-timeout
|
2024-02-29 20:09:43 +00:00
|
|
|
, pytest-harvest
|
2020-12-09 12:39:15 +00:00
|
|
|
, matplotlib
|
2022-09-09 14:08:57 +00:00
|
|
|
, decorator
|
|
|
|
, jinja2
|
|
|
|
, pooch
|
|
|
|
, tqdm
|
2024-02-29 20:09:43 +00:00
|
|
|
, packaging
|
|
|
|
, importlib-resources
|
|
|
|
, lazy-loader
|
|
|
|
, h5io
|
|
|
|
, pymatreader
|
2022-10-21 18:38:19 +00:00
|
|
|
, pythonOlder
|
2020-12-09 12:39:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mne-python";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.6.1";
|
|
|
|
pyproject = true;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-12-09 12:39:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mne-tools";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "mne-python";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-U1aMqcUZ3BcwqwOYh/qfG5PhacwBVioAgNc52uaoJL0";
|
2020-12-09 12:39:15 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "--cov-report=" "" \
|
|
|
|
--replace "--cov-branch" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scipy
|
2024-02-29 20:09:43 +00:00
|
|
|
matplotlib
|
2022-09-09 14:08:57 +00:00
|
|
|
tqdm
|
2024-02-29 20:09:43 +00:00
|
|
|
pooch
|
|
|
|
decorator
|
|
|
|
packaging
|
|
|
|
jinja2
|
|
|
|
lazy-loader
|
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
2020-12-09 12:39:15 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
hdf5 = [
|
|
|
|
h5io
|
|
|
|
pymatreader
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-timeout
|
2024-02-29 20:09:43 +00:00
|
|
|
pytest-harvest
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
preCheck = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
export HOME=$(mktemp -d)
|
2020-12-09 12:39:15 +00:00
|
|
|
export MNE_SKIP_TESTING_DATASET_TESTS=true
|
|
|
|
export MNE_SKIP_NETWORK_TESTS=1
|
|
|
|
'';
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"mne"
|
|
|
|
];
|
2020-12-09 12:39:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Magnetoencephelography and electroencephalography in Python";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "mne";
|
2022-10-21 18:38:19 +00:00
|
|
|
homepage = "https://mne.tools";
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://mne.tools/stable/changes/v${version}.html";
|
2020-12-09 12:39:15 +00:00
|
|
|
license = licenses.bsd3;
|
2024-02-29 20:09:43 +00:00
|
|
|
maintainers = with maintainers; [ bcdarwin mbalatsko ];
|
2020-12-09 12:39:15 +00:00
|
|
|
};
|
|
|
|
}
|