diff --git a/pkgs/development/python-modules/pycm/default.nix b/pkgs/development/python-modules/pycm/default.nix index 9e3b711718c3..878e36e5c07a 100644 --- a/pkgs/development/python-modules/pycm/default.nix +++ b/pkgs/development/python-modules/pycm/default.nix @@ -1,28 +1,55 @@ -{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, matplotlib, numpy, pytestCheckHook, seaborn }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, matplotlib +, numpy +, pytestCheckHook +, pythonOlder +, seaborn +}: buildPythonPackage rec { pname = "pycm"; version = "3.3"; + format = "setuptools"; - disabled = !isPy3k; + disabled = pythonOlder "3.5"; src = fetchFromGitHub { - owner = "sepandhaghighi"; - repo = pname; - rev = "v${version}"; + owner = "sepandhaghighi"; + repo = pname; + rev = "v${version}"; sha256 = "0i3qpb20mnc22qny1ar3yvxb1dac7njwi8bvi5sy5kywz10c5dkw"; }; - # remove a trivial dependency on the author's `art` Python ASCII art library + propagatedBuildInputs = [ + matplotlib + numpy + seaborn + ]; + + checkInputs = [ + pytestCheckHook + ]; + postPatch = '' + # Remove a trivial dependency on the author's `art` Python ASCII art library rm pycm/__main__.py - rm Otherfiles/notebook_check.py # also depends on python3Packages.notebook - substituteInPlace setup.py --replace '=get_requires()' '=[]' + # Also depends on python3Packages.notebook + rm Otherfiles/notebook_check.py + substituteInPlace setup.py \ + --replace '=get_requires()' '=[]' ''; - checkInputs = [ pytestCheckHook ]; - disabledTests = [ "pycm.pycm_compare.Compare" ]; # output formatting error - propagatedBuildInputs = [ matplotlib numpy seaborn ]; + disabledTests = [ + # Output formatting error + "pycm.pycm_compare.Compare" + "plot_test" + ]; + + pythonImportsCheck = [ + "pycm" + ]; meta = with lib; { description = "Multiclass confusion matrix library";