1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 beautifulsoup4,
6 pythonOlder,
7 pandas,
8 python,
9 numpy,
10 scikit-learn,
11 scipy,
12 lxml,
13 matplotlib,
14 sarge,
15 unittestCheckHook,
16 setuptools,
17}:
18
19buildPythonPackage {
20 pname = "trectools";
21 version = "0.0.50";
22
23 disabled = pythonOlder "3.6";
24
25 src = fetchFromGitHub {
26 owner = "joaopalotti";
27 repo = "trectools";
28 # https://github.com/joaopalotti/trectools/issues/41
29 rev = "8a896def007e3d657eb29f820ee3de98e2f32691";
30 hash = "sha256-p8BvLO+rD/l+ATE4+u3I6k25R1RVKlk2dn+RLQZTLDs=";
31 };
32
33 postPatch = ''
34 substituteInPlace setup.py \
35 --replace-fail "bs4 >= 0.0.0.1" "beautifulsoup4 >= 4.11.1"
36 '';
37
38 build-system = [ setuptools ];
39
40 dependencies = [
41 pandas
42 numpy
43 scikit-learn
44 scipy
45 lxml
46 beautifulsoup4
47 matplotlib
48 sarge
49 ];
50
51 unittestFlagsArray = [
52 "unittests/"
53 ];
54
55 nativeCheckInputs = [
56 unittestCheckHook
57 ];
58
59 pythonImportsCheck = [ "trectools" ];
60
61 meta = {
62 homepage = "https://github.com/joaopalotti/trectools";
63 description = "Library for assisting Information Retrieval (IR) practitioners with TREC-like campaigns";
64 license = lib.licenses.bsdOriginal;
65 maintainers = with lib.maintainers; [ MoritzBoehme ];
66 };
67}