From d69a2ffcea2fec72eb24c8ce202151cb3adfc992 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 24 May 2022 12:32:14 +0200 Subject: [PATCH] python310Packages.persim: disable failing tests on Python 3.10 --- .../python-modules/persim/default.nix | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/persim/default.nix b/pkgs/development/python-modules/persim/default.nix index 4ac21159d956..4e3717dec07e 100644 --- a/pkgs/development/python-modules/persim/default.nix +++ b/pkgs/development/python-modules/persim/default.nix @@ -9,15 +9,20 @@ , scikit-learn , scipy , pytestCheckHook +, pythonAtLeast +, pythonOlder }: buildPythonPackage rec { pname = "persim"; version = "0.3.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "ef0f0a247adcf6104ecac14117db0b24581710ea8a8d964816805395700b4975"; + sha256 = "sha256-7w8KJHrc9hBOysFBF9sLJFgXEOqKjZZIFoBTlXALSXU="; }; propagatedBuildInputs = [ @@ -41,10 +46,26 @@ buildPythonPackage rec { echo "backend: ps" > $HOME/.matplotlib/matplotlibrc ''; + pythonImportsCheck = [ + "persim" + ]; + + disabledTests = lib.optionals (pythonAtLeast "3.10") [ + # AttributeError: module 'collections' has no attribute 'Iterable' + "test_empyt_diagram_list" + "test_empty_diagram_list" + "test_fit_diagram" + "test_integer_diagrams" + "test_lists_of_lists" + "test_mixed_pairs" + "test_multiple_diagrams" + "test_n_pixels" + ]; + meta = with lib; { description = "Distances and representations of persistence diagrams"; homepage = "https://persim.scikit-tda.org"; license = licenses.mit; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; }