Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / annoy / default.nix
blob4de8d0adacb9b8ec002950a96386f0b3ffd7fc31
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , h5py
5 , numpy
6 , pynose
7 , pythonOlder
8 , setuptools
9 }:
11 buildPythonPackage rec {
12   pname = "annoy";
13   version = "1.17.3";
14   pyproject = true;
16   disabled = pythonOlder "3.7";
18   src = fetchPypi {
19     inherit pname version;
20     hash = "sha256-nL/r7+Cl+EPropxr5MhNYB9PQa1N7QSG8biMOwdznBU=";
21   };
23   postPatch = ''
24     substituteInPlace setup.py \
25       --replace-fail "'nose>=1.0'" ""
26   '';
28   build-system = [
29     setuptools
30   ];
32   nativeBuildInputs = [
33     h5py
34   ];
36   nativeCheckInputs = [
37     numpy
38     pynose
39   ];
41   pythonImportsCheck = [
42     "annoy"
43   ];
45   meta = with lib; {
46     description = "Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk";
47     homepage = "https://github.com/spotify/annoy";
48     changelog = "https://github.com/spotify/annoy/releases/tag/v${version}";
49     license = licenses.asl20;
50     maintainers = with maintainers; [ timokau ];
51   };