1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, numpy
5, scikit-learn
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "seqeval";
11 version = "1.2.2";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 owner = "chakki-works";
16 repo = "seqeval";
17 rev = "v${version}";
18 sha256 = "0qv05gn54kc4wpmwnflmfqw4gwwb8lxqhkiihl0pvl7s2i7qzx2j";
19 };
20
21 postPatch = ''
22 substituteInPlace setup.py \
23 --replace "use_scm_version=True," "version='${version}'," \
24 --replace "setup_requires=['setuptools_scm']," "setup_requires=[],"
25 '';
26
27 propagatedBuildInputs = [
28 numpy
29 scikit-learn
30 ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 ];
35
36 disabledTests = [
37 # tests call perl script and get stuck in there
38 "test_statistical_tests"
39 "test_by_ground_truth"
40 ];
41
42 meta = with lib; {
43 description = "A Python framework for sequence labeling evaluation";
44 homepage = "https://github.com/chakki-works/seqeval";
45 license = licenses.mit;
46 maintainers = with maintainers; [ hexa ];
47 };
48}