Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.2 kB view raw
1{ lib 2, fetchFromGitHub 3, buildPythonPackage 4, numpy 5, scipy 6, torch 7, autograd 8, matplotlib 9, pytestCheckHook 10}: 11 12buildPythonPackage rec { 13 pname = "pymanopt"; 14 version = "2.1.1"; 15 format = "setuptools"; 16 17 src = fetchFromGitHub { 18 owner = pname; 19 repo = pname; 20 rev = "refs/tags/${version}"; 21 hash = "sha256-nbSxqMmYWi71s74bbB9LAlPKEslTqG/j266cLfNHrwg="; 22 }; 23 24 propagatedBuildInputs = [ numpy scipy torch ]; 25 nativeCheckInputs = [ autograd matplotlib pytestCheckHook ]; 26 27 preCheck = '' 28 substituteInPlace "tests/conftest.py" \ 29 --replace "import tensorflow as tf" "" 30 substituteInPlace "tests/conftest.py" \ 31 --replace "tf.random.set_seed(seed)" "" 32 ''; 33 34 disabledTestPaths = [ 35 "tests/test_examples.py" 36 "tests/backends/test_tensorflow.py" 37 "tests/test_problem.py" 38 ]; 39 40 pythonImportsCheck = [ "pymanopt" ]; 41 42 meta = { 43 description = "Python toolbox for optimization on Riemannian manifolds with support for automatic differentiation"; 44 homepage = "https://www.pymanopt.org/"; 45 license = lib.licenses.bsd3; 46 maintainers = with lib.maintainers; [ yl3dy ]; 47 broken = lib.versionAtLeast scipy.version "1.10.0"; 48 }; 49}