at 23.11-beta 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, matplotlib 5, numpy 6, pytestCheckHook 7, pythonOlder 8, seaborn 9}: 10 11buildPythonPackage rec { 12 pname = "pycm"; 13 version = "4.0"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.5"; 17 18 src = fetchFromGitHub { 19 owner = "sepandhaghighi"; 20 repo = pname; 21 rev = "refs/tags/v${version}"; 22 hash = "sha256-GyH06G7bArFBTzV/Sx/KmoJvcoed0sswW7qGqsSULHo="; 23 }; 24 25 propagatedBuildInputs = [ 26 matplotlib 27 numpy 28 seaborn 29 ]; 30 31 nativeCheckInputs = [ 32 pytestCheckHook 33 ]; 34 35 postPatch = '' 36 # Remove a trivial dependency on the author's `art` Python ASCII art library 37 rm pycm/__main__.py 38 # Also depends on python3Packages.notebook 39 rm Otherfiles/notebook_check.py 40 substituteInPlace setup.py \ 41 --replace '=get_requires()' '=[]' 42 ''; 43 44 # https://github.com/sepandhaghighi/pycm/issues/488 45 pytestFlagsArray = [ "Test" ]; 46 47 pythonImportsCheck = [ 48 "pycm" 49 ]; 50 51 meta = with lib; { 52 description = "Multiclass confusion matrix library"; 53 homepage = "https://pycm.io"; 54 license = licenses.mit; 55 maintainers = with maintainers; [ bcdarwin ]; 56 }; 57}