2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
matplotlib,
|
|
|
|
numpy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
seaborn,
|
2022-01-07 04:07:37 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycm";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "4.0";
|
2022-01-07 04:07:37 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-01-07 04:07:37 +00:00
|
|
|
owner = "sepandhaghighi";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-GyH06G7bArFBTzV/Sx/KmoJvcoed0sswW7qGqsSULHo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
matplotlib
|
|
|
|
numpy
|
|
|
|
seaborn
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Minor tolerance issues with Python 3.12; should be fixed in next release
|
|
|
|
# (see https://github.com/sepandhaghighi/pycm/pull/528)
|
|
|
|
"verified_test"
|
|
|
|
"function_test"
|
2022-01-07 04:07:37 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2022-01-07 04:07:37 +00:00
|
|
|
# Remove a trivial dependency on the author's `art` Python ASCII art library
|
2020-04-24 23:36:52 +00:00
|
|
|
rm pycm/__main__.py
|
2022-01-07 04:07:37 +00:00
|
|
|
# Also depends on python3Packages.notebook
|
|
|
|
rm Otherfiles/notebook_check.py
|
|
|
|
substituteInPlace setup.py \
|
2024-06-05 15:53:02 +00:00
|
|
|
--replace-fail '=get_requires()' '=[]'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pycm" ];
|
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";
|
2023-03-24 00:07:29 +00:00
|
|
|
homepage = "https://pycm.io";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|