Files
nixpkgs/pkgs/development/python-modules/tensorly/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

62 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, pytestCheckHook
, pythonOlder
, scipy
, sparse
}:
buildPythonPackage rec {
pname = "tensorly";
version = "0.7.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "sha256-VcX3pCczZQUYZaD7xrrkOcj0QPJt28cYTwpZm5D/X3c=";
};
propagatedBuildInputs = [
numpy
scipy
sparse
];
nativeCheckInputs = [
pytestCheckHook
];
postPatch = ''
# nose is not actually required for anything
# (including testing with the minimal dependencies)
substituteInPlace setup.py \
--replace ", 'nose'" ""
'';
pythonImportsCheck = [
"tensorly"
];
pytestFlagsArray = [
"tensorly"
];
disabledTests = [
# AssertionError: Partial_SVD took too long, maybe full_matrices set wrongly
"test_svd_time"
];
meta = with lib; {
description = "Tensor learning in Python";
homepage = "https://tensorly.org/";
license = licenses.bsd3;
maintainers = with maintainers; [ bcdarwin ];
};
}