nixpkgs/pkgs/development/python-modules/einops/default.nix
Ben Darwin 1b7cd426f9 python311Packages.einops: remove chainer from nativeCheckInputs
Chainer is somewhat obsolete (and currently broken on master; see https://github.com/NixOS/nixpkgs/issues/277008) so doesn't
necessarily make sense to pull into the build-time closure of a great
deal of the Python deep learning dependency tree.
2023-12-27 17:33:58 -05:00

69 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, hatchling
, jupyter
, nbconvert
, numpy
, parameterized
, pillow
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "einops";
version = "0.7.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "arogozhnikov";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-wCs3rMnYCk07kJ3iPItxwCQATflKBYHk6tfBCjiF+bc=";
};
nativeBuildInputs = [ hatchling ];
nativeCheckInputs = [
jupyter
nbconvert
numpy
parameterized
pillow
pytestCheckHook
];
env.EINOPS_TEST_BACKENDS = "numpy";
preCheck = ''
export HOME=$(mktemp -d);
'';
pythonImportsCheck = [
"einops"
];
disabledTests = [
# Tests are failing as mxnet is not pulled-in
# https://github.com/NixOS/nixpkgs/issues/174872
"test_all_notebooks"
"test_dl_notebook_with_all_backends"
"test_backends_installed"
];
disabledTestPaths = [
"tests/test_layers.py"
];
meta = with lib; {
description = "Flexible and powerful tensor operations for readable and reliable code";
homepage = "https://github.com/arogozhnikov/einops";
license = licenses.mit;
maintainers = with maintainers; [ yl3dy ];
};
}