Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / gpy / default.nix
blob9c444f465f302584078a01c33799c79969e03990
1 { lib, stdenv
2 , buildPythonPackage
3 , fetchPypi
4 , numpy
5 , scipy
6 , six
7 , paramz
8 , matplotlib
9 , cython
10 , nose
13 buildPythonPackage rec {
14   pname = "GPy";
15   version = "1.9.9";
17   src = fetchPypi {
18     inherit pname version;
19     sha256 = "04faf0c24eacc4dea60727c50a48a07ddf9b5751a3b73c382105e2a31657c7ed";
20   };
22   buildInputs = [ cython ];
23   propagatedBuildInputs = [ numpy scipy six paramz matplotlib ];
24   checkInputs = [ nose ];
26   # $ nosetests GPy/testing/*.py
27   # => Ran 483 tests in 112.146s (on 8 cores)
28   # So instead, run shorter set of tests
29   checkPhase = ''
30     nosetests GPy/testing/linalg_test.py
31   '';
33   # Rebuild cython-generated .c files since the included
34   # ones were built with an older version of cython that is
35   # incompatible with python3.9
36   preBuild = ''
37     for fn in $(find . -name '*.pyx'); do
38       echo $fn | sed 's/\.\.pyx$/\.c/' | xargs ${cython}/bin/cython -3
39     done
40   '';
42   pythonImportsCheck = [
43     "GPy"
44   ];
46   meta = with lib; {
47     description = "Gaussian process framework in Python";
48     homepage = "https://sheffieldml.github.io/GPy";
49     license = licenses.bsd3;
50     maintainers = with maintainers; [ bcdarwin ];
51     broken = stdenv.isDarwin;  # See inscrutable error message here: https://github.com/NixOS/nixpkgs/pull/107653#issuecomment-751527547
52   };