From a6efe42fe09100bbffd3a00ad1b61d464e4a7e25 Mon Sep 17 00:00:00 2001 From: Maksym Balatsko Date: Sun, 1 Oct 2023 07:56:27 -0700 Subject: [PATCH] python3Packages.mne-python: 1.6.0 -> 1.6.1 --- .../python-modules/mne-python/default.nix | 73 ++++++++++++------- 1 file changed, 46 insertions(+), 27 deletions(-) diff --git a/pkgs/development/python-modules/mne-python/default.nix b/pkgs/development/python-modules/mne-python/default.nix index 8a85f487d2d2..c1e1a9561e24 100644 --- a/pkgs/development/python-modules/mne-python/default.nix +++ b/pkgs/development/python-modules/mne-python/default.nix @@ -1,66 +1,84 @@ { lib , buildPythonPackage , fetchFromGitHub +, setuptools +, setuptools-scm , numpy , scipy , pytestCheckHook , pytest-timeout -, h5py +, pytest-harvest , matplotlib -, nibabel -, pandas -, scikit-learn , decorator , jinja2 , pooch , tqdm -, setuptools +, packaging +, importlib-resources +, lazy-loader +, h5io +, pymatreader , pythonOlder }: buildPythonPackage rec { pname = "mne-python"; - version = "1.6.0"; - format = "setuptools"; + version = "1.6.1"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "mne-tools"; - repo = pname; + repo = "mne-python"; rev = "refs/tags/v${version}"; - hash = "sha256-OoaXNHGL2svOpNL5GHcVRfQc9GxIRpZRhpZ5Hi1JTzM="; + hash = "sha256-U1aMqcUZ3BcwqwOYh/qfG5PhacwBVioAgNc52uaoJL0"; }; - propagatedBuildInputs = [ - decorator - jinja2 - matplotlib - numpy - pooch - scipy + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--cov-report=" "" \ + --replace "--cov-branch" "" + ''; + + nativeBuildInputs = [ setuptools - tqdm + setuptools-scm ]; + propagatedBuildInputs = [ + numpy + scipy + matplotlib + tqdm + pooch + decorator + packaging + jinja2 + lazy-loader + ] ++ lib.optionals (pythonOlder "3.9") [ + importlib-resources + ]; + + passthru.optional-dependencies = { + hdf5 = [ + h5io + pymatreader + ]; + }; + nativeCheckInputs = [ - h5py - nibabel - pandas pytestCheckHook - scikit-learn pytest-timeout - ]; + pytest-harvest + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); preCheck = '' - export HOME=$TMP + export HOME=$(mktemp -d) export MNE_SKIP_TESTING_DATASET_TESTS=true export MNE_SKIP_NETWORK_TESTS=1 ''; - # All tests pass, but Pytest hangs afterwards - probably some thread hasn't terminated - doCheck = false; - pythonImportsCheck = [ "mne" ]; @@ -68,6 +86,7 @@ buildPythonPackage rec { meta = with lib; { description = "Magnetoencephelography and electroencephalography in Python"; homepage = "https://mne.tools"; + changelog = "https://mne.tools/stable/changes/v${version}.html"; license = licenses.bsd3; maintainers = with maintainers; [ bcdarwin ]; };