2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-01-07 04:07:37 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, isPy27
|
|
|
|
, numpy
|
|
|
|
, scipy
|
|
|
|
, sparse
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tensorly";
|
2022-01-07 04:07:37 +00:00
|
|
|
version = "0.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-01-07 04:07:37 +00:00
|
|
|
sha256 = "VcX3pCczZQUYZaD7xrrkOcj0QPJt28cYTwpZm5D/X3c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
# nose is not actually required for anything
|
|
|
|
# (including testing with the minimal dependencies)
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace ", 'nose'" ""
|
|
|
|
'';
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
propagatedBuildInputs = [ numpy scipy sparse ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
pytestFlagsArray = [ "tensorly" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
pythonImportsCheck = [ "tensorly" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Tensor learning in Python";
|
|
|
|
homepage = "https://tensorly.org/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|