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