summary refs log tree commit diff
path: root/pkgs/development/python-modules/catboost/default.nix
blob: 840c01d876a1ae5e0a632ca73b67023ed866ada2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ lib
, buildPythonPackage
, catboost
, python
, graphviz
, matplotlib
, numpy
, pandas
, plotly
, scipy
, setuptools
, six
, wheel
}:

buildPythonPackage {
  inherit (catboost) pname version src meta;
  format = "pyproject";

  sourceRoot = "source/catboost/python-package";

  nativeBuildInputs = [
    setuptools
    wheel
  ];

  propagatedBuildInputs = [
    graphviz
    matplotlib
    numpy
    pandas
    plotly
    scipy
    six
  ];

  buildPhase = ''
    runHook preBuild

    # these arguments must set after bdist_wheel
    ${python.pythonOnBuildForHost.interpreter} setup.py bdist_wheel --no-widget --prebuilt-extensions-build-root-dir=${lib.getDev catboost}

    runHook postBuild
  '';

  # setup a test is difficult
  doCheck = false;

  pythonImportsCheck = [ "catboost" ];
}