summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/whoosh/default.nix
blob: 4b4d8ead332033e559d83146571e045d56b427ff (plain)
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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage rec {
  pname = "whoosh";
  version = "2.7.4";
  pyproject = true;

  src = fetchPypi {
    pname = "Whoosh";
    inherit version;
    hash = "sha256-fKVjPb+p4OD6QA0xUaigxL7FO9Ls7cCmdwWxdWXDGoM=";
  };

  build-system = [ setuptools ];

  nativeCheckInputs = [ pytestCheckHook ];

  # Wrong encoding
  postPatch = ''
    rm tests/test_reading.py
    substituteInPlace setup.cfg \
      --replace-fail "[pytest]" "[tool:pytest]"
  '';

  pythonImportsCheck = [ "whoosh" ];

  disabledTests = [ "test_minimize_dfa" ];

  meta = {
    description = "Fast, pure-Python full text indexing, search, and spell checking library";
    homepage = "https://github.com/mchaput/whoosh";
    license = lib.licenses.bsd2;
    maintainers = [ ];
  };
}