1{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, matplotlib, numpy, pytestCheckHook, seaborn }:
2
3buildPythonPackage rec {
4 pname = "pycm";
5 version = "3.3";
6
7 disabled = !isPy3k;
8
9 src = fetchFromGitHub {
10 owner = "sepandhaghighi";
11 repo = pname;
12 rev = "v${version}";
13 sha256 = "0i3qpb20mnc22qny1ar3yvxb1dac7njwi8bvi5sy5kywz10c5dkw";
14 };
15
16 # remove a trivial dependency on the author's `art` Python ASCII art library
17 postPatch = ''
18 rm pycm/__main__.py
19 rm Otherfiles/notebook_check.py # also depends on python3Packages.notebook
20 substituteInPlace setup.py --replace '=get_requires()' '=[]'
21 '';
22
23 checkInputs = [ pytestCheckHook ];
24 disabledTests = [ "pycm.pycm_compare.Compare" ]; # output formatting error
25 propagatedBuildInputs = [ matplotlib numpy seaborn ];
26
27 meta = with lib; {
28 description = "Multiclass confusion matrix library";
29 homepage = "https://pycm.ir";
30 license = licenses.mit;
31 maintainers = with maintainers; [ bcdarwin ];
32 };
33}