summary refs log tree commit diff
path: root/pkgs/development/python-modules/marisa-trie/default.nix
blob: 71be4f5726d15242bb37db1b28b996f7c4fb0bf5 (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
{ lib
, buildPythonPackage
, fetchPypi
, pytestrunner
, pytest
, hypothesis
}:

buildPythonPackage rec {
  pname = "marisa-trie";
  version = "0.7.5";

  src = fetchPypi {
    inherit pname version;
    sha256 = "c73bc25d868e8c4ea7aa7f1e19892db07bba2463351269b05340ccfa06eb2baf";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "hypothesis==" "hypothesis>="
  '';

  nativeBuildInputs = [ pytestrunner ];

  checkInputs = [ pytest hypothesis ];

  meta = with lib; {
    description = "Static memory-efficient Trie-like structures for Python (2.x and 3.x) based on marisa-trie C++ library";
    longDescription = "There are official SWIG-based Python bindings included in C++ library distribution; this package provides alternative Cython-based pip-installable Python bindings.";
    homepage =  https://github.com/kmike/marisa-trie;
    license = licenses.mit;
    maintainers = with maintainers; [ ixxie ];
  };
}