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