1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "whoosh";
12 version = "2.7.4";
13 pyproject = true;
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchPypi {
18 pname = "Whoosh";
19 inherit version;
20 hash = "sha256-fKVjPb+p4OD6QA0xUaigxL7FO9Ls7cCmdwWxdWXDGoM=";
21 };
22
23 build-system = [ setuptools ];
24
25 nativeCheckInputs = [ pytestCheckHook ];
26
27 # Wrong encoding
28 postPatch = ''
29 rm tests/test_reading.py
30 substituteInPlace setup.cfg \
31 --replace-fail "[pytest]" "[tool:pytest]"
32 '';
33
34 pythonImportsCheck = [ "whoosh" ];
35
36 disabledTests = [ "test_minimize_dfa" ];
37
38 meta = with lib; {
39 description = "Fast, pure-Python full text indexing, search, and spell checking library";
40 homepage = "https://github.com/mchaput/whoosh";
41 license = licenses.bsd2;
42 maintainers = [ ];
43 };
44}