2020-04-17 00:55:38 -04:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-05-21 20:45:17 -04:00
|
|
|
hatchling,
|
|
|
|
hatch-vcs,
|
2020-04-17 00:55:38 -04:00
|
|
|
numpy,
|
|
|
|
scipy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-timeout,
|
|
|
|
matplotlib,
|
2022-08-20 13:21:59 +02:00
|
|
|
decorator,
|
|
|
|
jinja2,
|
|
|
|
pooch,
|
|
|
|
tqdm,
|
2023-10-01 07:56:27 -07:00
|
|
|
packaging,
|
|
|
|
lazy-loader,
|
|
|
|
h5io,
|
|
|
|
pymatreader,
|
2022-10-20 09:12:26 +02:00
|
|
|
pythonOlder,
|
2020-04-17 00:55:38 -04:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mne-python";
|
2024-06-15 04:28:45 +00:00
|
|
|
version = "1.7.1";
|
2023-10-01 07:56:27 -07:00
|
|
|
pyproject = true;
|
2022-10-20 09:12:26 +02:00
|
|
|
|
2024-05-21 20:45:17 -04:00
|
|
|
disabled = pythonOlder "3.9";
|
2020-04-17 00:55:38 -04:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mne-tools";
|
2023-10-01 07:56:27 -07:00
|
|
|
repo = "mne-python";
|
2022-07-16 12:59:18 +02:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-15 04:28:45 +00:00
|
|
|
hash = "sha256-piCFynpKh7gTWIGh2g0gJICLS+eg/0XAxaDkyu7v5vs=";
|
2020-04-17 00:55:38 -04:00
|
|
|
};
|
|
|
|
|
2023-10-01 07:56:27 -07:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-05-21 20:45:17 -04:00
|
|
|
--replace-fail "--cov-report=" "" \
|
|
|
|
--replace-fail "--cov-branch" ""
|
2023-10-01 07:56:27 -07:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-05-21 20:45:17 -04:00
|
|
|
hatchling
|
|
|
|
hatch-vcs
|
2023-10-01 07:56:27 -07:00
|
|
|
];
|
|
|
|
|
2022-08-20 13:21:59 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scipy
|
2023-10-01 07:56:27 -07:00
|
|
|
matplotlib
|
2022-08-20 13:21:59 +02:00
|
|
|
tqdm
|
2023-10-01 07:56:27 -07:00
|
|
|
pooch
|
|
|
|
decorator
|
|
|
|
packaging
|
|
|
|
jinja2
|
|
|
|
lazy-loader
|
2024-05-21 20:45:17 -04:00
|
|
|
];
|
2020-04-17 00:55:38 -04:00
|
|
|
|
2024-05-21 20:45:17 -04:00
|
|
|
passthru.optional-dependencies.hdf5 = [
|
|
|
|
h5io
|
|
|
|
pymatreader
|
|
|
|
];
|
2023-10-01 07:56:27 -07:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-20 13:21:59 +02:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-timeout
|
2023-10-01 07:56:27 -07:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2022-08-20 13:21:59 +02:00
|
|
|
|
2020-04-17 00:55:38 -04:00
|
|
|
preCheck = ''
|
2023-10-01 07:56:27 -07:00
|
|
|
export HOME=$(mktemp -d)
|
2020-04-17 00:55:38 -04:00
|
|
|
export MNE_SKIP_TESTING_DATASET_TESTS=true
|
|
|
|
export MNE_SKIP_NETWORK_TESTS=1
|
|
|
|
'';
|
|
|
|
|
2024-07-18 13:38:47 +03:00
|
|
|
disabledTests = [
|
|
|
|
# Fails due to changes in Numpy types
|
|
|
|
"mne.stats._adjacency.combine_adjacency"
|
|
|
|
];
|
|
|
|
|
2022-10-20 09:12:26 +02:00
|
|
|
pythonImportsCheck = [ "mne" ];
|
2020-04-17 00:55:38 -04:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Magnetoencephelography and electroencephalography in Python";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "mne";
|
2022-10-20 09:12:26 +02:00
|
|
|
homepage = "https://mne.tools";
|
2023-10-01 07:56:27 -07:00
|
|
|
changelog = "https://mne.tools/stable/changes/v${version}.html";
|
2020-04-17 00:55:38 -04:00
|
|
|
license = licenses.bsd3;
|
2023-10-01 07:57:16 -07:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
bcdarwin
|
|
|
|
mbalatsko
|
|
|
|
];
|
2020-04-17 00:55:38 -04:00
|
|
|
};
|
|
|
|
}
|