about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pynndescent/default.nix
blob: aab8f4e743a294c9c4a03afa3985717fa5139b9f (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
51
52
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, nose
, scikitlearn
, scipy
, numba
, llvmlite
, joblib
}:

buildPythonPackage rec {
  pname = "pynndescent";
  version = "0.5.1";

  src = fetchPypi {
    inherit pname version;
    sha256 = "74a05a54d13573a38878781d44812ac6df97d8762a56f9bb5dd87a99911820fe";
  };

  patches = [
    # fixes tests, included in 0.5.2
    (fetchpatch {
      url = "https://github.com/lmcinnes/pynndescent/commit/ef5d8c3c3bfe976063b6621e3e0734c0c22d813b.patch";
      sha256 = "sha256-49n3kevs3wpzd4FfZVKmNpF2o1V8pJs4KOx8zCAhR3s=";
    })
  ];

  checkInputs = [
    nose
  ];

  propagatedBuildInputs = [
    scikitlearn
    scipy
    numba
    llvmlite
    joblib
  ];

  checkPhase = ''
    nosetests
  '';

  meta = with lib; {
    description = "Nearest Neighbor Descent";
    homepage = "https://github.com/lmcinnes/pynndescent";
    license = licenses.bsd2;
    maintainers = [ maintainers.mic92 ];
  };
}