3e7541c14f
GitOrigin-RevId: ff377a78794d412a35245e05428c8f95fef3951f
60 lines
1.1 KiB
Nix
60 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, matplotlib
|
|
, numpy
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, seaborn
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pycm";
|
|
version = "3.3";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sepandhaghighi";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "0i3qpb20mnc22qny1ar3yvxb1dac7njwi8bvi5sy5kywz10c5dkw";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
matplotlib
|
|
numpy
|
|
seaborn
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
# Remove a trivial dependency on the author's `art` Python ASCII art library
|
|
rm pycm/__main__.py
|
|
# Also depends on python3Packages.notebook
|
|
rm Otherfiles/notebook_check.py
|
|
substituteInPlace setup.py \
|
|
--replace '=get_requires()' '=[]'
|
|
'';
|
|
|
|
disabledTests = [
|
|
# Output formatting error
|
|
"pycm.pycm_compare.Compare"
|
|
"plot_test"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"pycm"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Multiclass confusion matrix library";
|
|
homepage = "https://pycm.ir";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
};
|
|
}
|