python3Packages.persim: migrate to pyproject, enable __structuredAttrs, use finalAttrs, reenable disabled tests (#539639)

This commit is contained in:
Yohann Boniface
2026-07-12 21:30:14 +00:00
committed by GitHub
@@ -2,6 +2,7 @@
lib,
buildPythonPackage,
fetchPypi,
setuptools,
deprecated,
hopcroftkarp,
joblib,
@@ -12,17 +13,24 @@
pytestCheckHook,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "persim";
version = "0.3.8";
format = "setuptools";
pyproject = true;
__structuredAttrs = true;
src = fetchPypi {
inherit pname version;
inherit (finalAttrs) version;
pname = "persim";
hash = "sha256-4T0YWEF2uKdk0W1+Vt8I3Mi6ZsazJXoHI0W+O9WbpA0=";
};
propagatedBuildInputs = [
build-system = [
setuptools
];
dependencies = [
deprecated
hopcroftkarp
joblib
@@ -43,27 +51,11 @@ buildPythonPackage rec {
pythonImportsCheck = [ "persim" ];
disabledTests = [
# 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"
# https://github.com/scikit-tda/persim/issues/67
"test_persistenceimager"
# ValueError: setting an array element with a sequence
"test_exact_critical_pairs"
];
meta = {
description = "Distances and representations of persistence diagrams";
homepage = "https://persim.scikit-tda.org";
changelog = "https://github.com/scikit-tda/persim/releases/tag/v${version}";
changelog = "https://github.com/scikit-tda/persim/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = [ ];
};
}
})