Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.4 kB view raw
1{ stdenv 2, lib 3, buildPythonPackage 4, fetchFromGitHub 5, numpy 6, pytestCheckHook 7, pythonOlder 8, scipy 9}: 10 11buildPythonPackage rec { 12 pname = "tensorly"; 13 version = "0.8.0"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = pname; 20 repo = pname; 21 rev = "refs/tags/${version}"; 22 hash = "sha256-6iZvUgsoYf8fDGEuAODgfr4jCkiJwaJXlQUAsaOF9JU="; 23 }; 24 25 propagatedBuildInputs = [ 26 numpy 27 scipy 28 ]; 29 30 nativeCheckInputs = [ 31 pytestCheckHook 32 ]; 33 34 pythonImportsCheck = [ 35 "tensorly" 36 "tensorly.base" 37 "tensorly.cp_tensor" 38 "tensorly.tucker_tensor" 39 "tensorly.tt_tensor" 40 "tensorly.tt_matrix" 41 "tensorly.parafac2_tensor" 42 "tensorly.tenalg" 43 "tensorly.decomposition" 44 "tensorly.regression" 45 "tensorly.metrics" 46 "tensorly.random" 47 "tensorly.datasets" 48 "tensorly.plugins" 49 "tensorly.contrib" 50 ]; 51 52 pytestFlagsArray = [ 53 "tensorly" 54 ]; 55 56 disabledTests = [ 57 # tries to download data: 58 "test_kinetic" 59 # AssertionError: Partial_SVD took too long, maybe full_matrices set wrongly 60 "test_svd_time" 61 ]; 62 63 meta = with lib; { 64 description = "Tensor learning in Python"; 65 homepage = "https://tensorly.org/"; 66 license = licenses.bsd3; 67 maintainers = with maintainers; [ bcdarwin ]; 68 broken = stdenv.isLinux && stdenv.isAarch64; # test failures: test_TTOI and test_validate_tucker_rank 69 }; 70}