at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 hatchling, 6 jupyter, 7 nbconvert, 8 numpy, 9 parameterized, 10 pillow, 11 pytestCheckHook, 12 writableTmpDirAsHomeHook, 13 pythonOlder, 14 torch, 15}: 16 17buildPythonPackage rec { 18 pname = "einops"; 19 version = "0.8.1"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchFromGitHub { 25 owner = "arogozhnikov"; 26 repo = "einops"; 27 tag = "v${version}"; 28 hash = "sha256-J9m5LMOleHf2UziUbOtwf+DFpu/wBDcAyHUor4kqrR8="; 29 }; 30 31 build-system = [ hatchling ]; 32 33 nativeCheckInputs = [ 34 writableTmpDirAsHomeHook 35 jupyter 36 nbconvert 37 numpy 38 parameterized 39 pillow 40 pytestCheckHook 41 torch 42 ]; 43 44 env.EINOPS_TEST_BACKENDS = "numpy"; 45 46 pythonImportsCheck = [ "einops" ]; 47 48 disabledTestPaths = [ 49 # skip folder with notebook samples that depend on large packages 50 # or accelerator access and have been unreliable 51 "scripts/" 52 ]; 53 54 __darwinAllowLocalNetworking = true; 55 56 meta = with lib; { 57 changelog = "https://github.com/arogozhnikov/einops/releases/tag/${src.tag}"; 58 description = "Flexible and powerful tensor operations for readable and reliable code"; 59 homepage = "https://github.com/arogozhnikov/einops"; 60 license = licenses.mit; 61 maintainers = with maintainers; [ yl3dy ]; 62 }; 63}