2021-08-22 07:53:02 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, matplotlib, numpy, pytestCheckHook, seaborn }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycm";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "3.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sepandhaghighi";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "0i3qpb20mnc22qny1ar3yvxb1dac7njwi8bvi5sy5kywz10c5dkw";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# remove a trivial dependency on the author's `art` Python ASCII art library
|
|
|
|
postPatch = ''
|
|
|
|
rm pycm/__main__.py
|
2021-08-22 07:53:02 +00:00
|
|
|
rm Otherfiles/notebook_check.py # also depends on python3Packages.notebook
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace setup.py --replace '=get_requires()' '=[]'
|
|
|
|
'';
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
disabledTests = [ "pycm.pycm_compare.Compare" ]; # output formatting error
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [ matplotlib numpy seaborn ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Multiclass confusion matrix library";
|
|
|
|
homepage = "https://pycm.ir";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|