a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
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.7";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sepandhaghighi";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "sha256-Yow5MVbaBgKA7U6RNpS/Yh1mG3XSLKPSDsUeBRSln1U=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
matplotlib
|
|
numpy
|
|
seaborn
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
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 ];
|
|
};
|
|
}
|