Merge pull request #152362 from bcdarwin/update-python3-tensorly
python3Packages.tensorly: 0.4.5 -> 0.7.0
This commit is contained in:
commit
069bcc6b43
1 changed files with 12 additions and 21 deletions
|
@ -1,45 +1,36 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, pytest
|
, pytestCheckHook
|
||||||
, nose
|
|
||||||
, isPy27
|
, isPy27
|
||||||
, numpy
|
, numpy
|
||||||
, scipy
|
, scipy
|
||||||
, sparse
|
, sparse
|
||||||
, pytorch
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "tensorly";
|
pname = "tensorly";
|
||||||
version = "0.4.5";
|
version = "0.7.0";
|
||||||
disabled = isPy27;
|
disabled = isPy27;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = pname;
|
owner = pname;
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "1ml91yaxwx4msisxbm92yf22qfrscvk58f3z2r1jhi96pw2k4i7x";
|
sha256 = "VcX3pCczZQUYZaD7xrrkOcj0QPJt28cYTwpZm5D/X3c=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ numpy scipy sparse ]
|
# nose is not actually required for anything
|
||||||
++ lib.optionals (!doCheck) [ nose ]; # upstream added nose to install_requires
|
# (including testing with the minimal dependencies)
|
||||||
|
postPatch = ''
|
||||||
checkInputs = [ pytest nose pytorch ];
|
substituteInPlace setup.py --replace ", 'nose'" ""
|
||||||
# also has a cupy backend, but the tests are currently broken
|
|
||||||
# (e.g. attempts to access cupy.qr instead of cupy.linalg.qr)
|
|
||||||
# and this backend also adds a non-optional CUDA dependence,
|
|
||||||
# as well as tensorflow and mxnet backends, but the tests don't
|
|
||||||
# seem to exercise these backend by default
|
|
||||||
|
|
||||||
# uses >= 140GB of ram to test
|
|
||||||
doCheck = false;
|
|
||||||
checkPhase = ''
|
|
||||||
runHook preCheck
|
|
||||||
nosetests -e "test_cupy"
|
|
||||||
runHook postCheck
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ numpy scipy sparse ];
|
||||||
|
|
||||||
|
checkInputs = [ pytestCheckHook ];
|
||||||
|
pytestFlagsArray = [ "tensorly" ];
|
||||||
|
|
||||||
pythonImportsCheck = [ "tensorly" ];
|
pythonImportsCheck = [ "tensorly" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue