about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/whoosh/default.nix
blob: 10053bc27918ebeb3bb54f69a19e96d1ffb14fc3 (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
{ lib, buildPythonPackage, fetchPypi, pytest }:

buildPythonPackage rec {
  pname = "Whoosh";
  version = "2.7.4";
  src = fetchPypi {
    inherit pname version;
    sha256 = "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw";
  };

  nativeCheckInputs = [ pytest ];

  # Wrong encoding
  postPatch = ''
    rm tests/test_reading.py
    substituteInPlace setup.cfg --replace "[pytest]" "[tool:pytest]"
  '';
  checkPhase =  ''
    # FIXME: test_minimize_dfa fails on python 3.6
    py.test -k "not test_timelimit and not test_minimize_dfa"
  '';

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