1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, matplotlib
5, numpy
6, pytestCheckHook
7, pythonOlder
8, seaborn
9}:
10
11buildPythonPackage rec {
12 pname = "pycm";
13 version = "3.6";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.5";
17
18 src = fetchFromGitHub {
19 owner = "sepandhaghighi";
20 repo = pname;
21 rev = "refs/tags/v${version}";
22 sha256 = "sha256-96M/QKt4AdiZoZ7L9AHocSyZPkwEb2iuRJKW3rVP3hc=";
23 };
24
25 propagatedBuildInputs = [
26 matplotlib
27 numpy
28 seaborn
29 ];
30
31 checkInputs = [
32 pytestCheckHook
33 ];
34
35 postPatch = ''
36 # Remove a trivial dependency on the author's `art` Python ASCII art library
37 rm pycm/__main__.py
38 # Also depends on python3Packages.notebook
39 rm Otherfiles/notebook_check.py
40 substituteInPlace setup.py \
41 --replace '=get_requires()' '=[]'
42 '';
43
44 disabledTests = [
45 # Output formatting error
46 "pycm.pycm_compare.Compare"
47 "plot_test"
48 ];
49
50 pythonImportsCheck = [
51 "pycm"
52 ];
53
54 meta = with lib; {
55 description = "Multiclass confusion matrix library";
56 homepage = "https://pycm.ir";
57 license = licenses.mit;
58 maintainers = with maintainers; [ bcdarwin ];
59 };
60}