58 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
einops,
fetchFromGitHub,
flit-core,
numba,
numpy,
pytestCheckHook,
pythonOlder,
scipy,
xarray,
}:
buildPythonPackage rec {
pname = "xarray-einstats";
version = "0.9.1";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "arviz-devs";
repo = "xarray-einstats";
tag = "v${version}";
hash = "sha256-CgyMc2Yvut+1LfH9F2FAd62HuLu+58Xr50txbWj4mYU=";
};
build-system = [ flit-core ];
dependencies = [
numpy
scipy
xarray
];
optional-dependencies = {
einops = [ einops ];
numba = [ numba ];
};
nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies);
pythonImportsCheck = [ "xarray_einstats" ];
disabledTests = [
# TypeError
"test_pinv"
];
meta = with lib; {
description = "Stats, linear algebra and einops for xarray";
homepage = "https://github.com/arviz-devs/xarray-einstats";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}