about summary refs log tree commit diff
path: root/pkgs/development/python-modules/floret/default.nix
blob: b2e1099e201587168558d264129ac81941658c06 (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,
  pythonOlder,
  fetchFromGitHub,
  pybind11,
  setuptools,
  wheel,
  numpy,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "floret";
  version = "0.10.5";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "explosion";
    repo = "floret";
    rev = "refs/tags/v${version}";
    hash = "sha256-7vkw6H0ZQoHEwNusY6QWh/vPbSCdP1ZaaqABHsZH6hQ=";
  };

  patches = [ ./cstdint.patch ];

  nativeBuildInputs = [
    pybind11
    setuptools
    wheel
  ];

  propagatedBuildInputs = [
    numpy
    pybind11
  ];

  pythonImportsCheck = [ "floret" ];

  nativeCheckInputs = [ pytestCheckHook ];

  meta = with lib; {
    description = "FastText + Bloom embeddings for compact, full-coverage vectors with spaCy";
    homepage = "https://github.com/explosion/floret";
    license = licenses.mit;
    maintainers = with maintainers; [ GaetanLepage ];
  };
}