Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at domenkozar-patch-1 52 lines 1.3 kB view raw
1{ lib 2, fetchFromGitHub 3, buildPythonPackage 4, numpy 5, scipy 6, torch 7, autograd 8, nose2 9, matplotlib 10, tensorflow 11}: 12 13buildPythonPackage rec { 14 pname = "pymanopt"; 15 version = "2.0.1"; 16 17 src = fetchFromGitHub { 18 owner = pname; 19 repo = pname; 20 rev = "refs/tags/${version}"; 21 sha256 = "sha256-VwCUqKI1PkR8nUVaa73bkTw67URKPaza3VU9g+rB+Mg="; 22 }; 23 24 propagatedBuildInputs = [ numpy scipy torch ]; 25 checkInputs = [ nose2 autograd matplotlib tensorflow ]; 26 27 checkPhase = '' 28 runHook preCheck 29 30 # upstream themselves seem unsure about the robustness of these 31 # tests - see https://github.com/pymanopt/pymanopt/issues/219 32 grep -lr 'test_second_order_function_approximation' tests/ | while read -r fn ; do 33 substituteInPlace "$fn" \ 34 --replace \ 35 'test_second_order_function_approximation' \ 36 'dont_test_second_order_function_approximation' 37 done 38 39 nose2 tests -v 40 41 runHook postCheck 42 ''; 43 44 pythonImportsCheck = [ "pymanopt" ]; 45 46 meta = { 47 description = "Python toolbox for optimization on Riemannian manifolds with support for automatic differentiation"; 48 homepage = "https://www.pymanopt.org/"; 49 license = lib.licenses.bsd3; 50 maintainers = with lib.maintainers; [ yl3dy ]; 51 }; 52}