1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, numpy
5, scipy
6, autograd
7, nose2
8}:
9
10buildPythonPackage rec {
11 pname = "pymanopt";
12 version = "0.2.5";
13
14 src = fetchFromGitHub {
15 owner = pname;
16 repo = pname;
17 rev = version;
18 sha256 = "0zk775v281375sangc5qkwrkb8yc9wx1g8b1917s4s8wszzkp8k6";
19 };
20
21 propagatedBuildInputs = [ numpy scipy ];
22 checkInputs = [ nose2 autograd ];
23
24 checkPhase = ''
25 # nose2 doesn't properly support excludes
26 rm tests/test_{problem,tensorflow,theano}.py
27
28 nose2 tests -v
29 '';
30
31 pythonImportsCheck = [ "pymanopt" ];
32
33 meta = {
34 description = "Python toolbox for optimization on Riemannian manifolds with support for automatic differentiation";
35 homepage = "https://www.pymanopt.org/";
36 license = lib.licenses.bsd3;
37 maintainers = with lib.maintainers; [ yl3dy ];
38 };
39}