summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-crfsuite/default.nix
blob: 6a7624d748353e56103aa15d9bd16fe66dc59d51 (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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  pytestCheckHook,
  cython,
}:

buildPythonPackage rec {
  pname = "python-crfsuite";
  version = "0.9.12";
  format = "setuptools";

  src = fetchPypi {
    inherit version;
    pname = "python_crfsuite";
    hash = "sha256-2zf8zDvY8MScKKdpfKecidZ7P9W/EZEihmFpJArExIA=";
  };

  preCheck = ''
    # make sure import the built version, not the source one
    rm -r pycrfsuite
  '';

  build-system = [
    cython
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "pycrfsuite" ];

  meta = {
    description = "Python binding for CRFsuite";
    homepage = "https://github.com/scrapinghub/python-crfsuite";
    changelog = "https://github.com/scrapinghub/python-crfsuite/blob/${version}/CHANGES.rst";
    license = lib.licenses.mit;
    teams = [ lib.teams.tts ];
  };
}