1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 cython,
7}:
8
9buildPythonPackage rec {
10 pname = "python-crfsuite";
11 version = "0.9.11";
12 format = "setuptools";
13
14 src = fetchPypi {
15 inherit version;
16 pname = "python_crfsuite";
17 hash = "sha256-bv+WXKcFZzltgiyaNep0sPftsn2UcVJJl72r56baX1o=";
18 };
19
20 preCheck = ''
21 # make sure import the built version, not the source one
22 rm -r pycrfsuite
23 '';
24
25 build-system = [
26 cython
27 ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30
31 pythonImportsCheck = [ "pycrfsuite" ];
32
33 meta = with lib; {
34 description = "Python binding for CRFsuite";
35 homepage = "https://github.com/scrapinghub/python-crfsuite";
36 license = licenses.mit;
37 teams = [ teams.tts ];
38 };
39}