git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #152362 from bcdarwin/update-python3-tensorly

python3Packages.tensorly: 0.4.5 -> 0.7.0

commit069bcc6b43f742b5afa9871802c76c290dfdba70 authorRobert Scott <code@humanleg.org.uk> dateThu 6 Jan 2022, 18:23 (5 years ago) parentd6997ed1f5e0c8
1 file changed+11−20
pkgs/development/python-modules/tensorly/default.nix+11−20
pkgs/development/python-modules/tensorly/default.nix+11−20
@@ -1,44 +1,35 @@
11{ lib
22, buildPythonPackage
33, fetchFromGitHub
4−, pytest
5−, nose
4+, pytestCheckHook
65, isPy27
76, numpy
87, scipy
98, sparse
10−, pytorch
119}:
1210
1311buildPythonPackage rec {
1412 pname = "tensorly";
15− version = "0.4.5";
13+ version = "0.7.0";
1614 disabled = isPy27;
1715
1816 src = fetchFromGitHub {
1917 owner = pname;
2018 repo = pname;
2119 rev = version;
22− sha256 = "1ml91yaxwx4msisxbm92yf22qfrscvk58f3z2r1jhi96pw2k4i7x";
20+ sha256 = "VcX3pCczZQUYZaD7xrrkOcj0QPJt28cYTwpZm5D/X3c=";
2321 };
2422
25− propagatedBuildInputs = [ numpy scipy sparse ]
26− ++ lib.optionals (!doCheck) [ nose ]; # upstream added nose to install_requires
23+ # nose is not actually required for anything
24+ # (including testing with the minimal dependencies)
25+ postPatch = ''
26+ substituteInPlace setup.py --replace ", 'nose'" ""
27+ '';
2728
28− checkInputs = [ pytest nose pytorch ];
29− # also has a cupy backend, but the tests are currently broken
30− # (e.g. attempts to access cupy.qr instead of cupy.linalg.qr)
31− # and this backend also adds a non-optional CUDA dependence,
32− # as well as tensorflow and mxnet backends, but the tests don't
33− # seem to exercise these backend by default
29+ propagatedBuildInputs = [ numpy scipy sparse ];
3430
35− # uses >= 140GB of ram to test
36− doCheck = false;
37− checkPhase = ''
38− runHook preCheck
39− nosetests -e "test_cupy"
40− runHook postCheck
41− '';
31+ checkInputs = [ pytestCheckHook ];
32+ pytestFlagsArray = [ "tensorly" ];
4233
4334 pythonImportsCheck = [ "tensorly" ];
4435