evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / persim / default.nix
blob060e3ff8ef72ef46decabfa5faa00b5e77109972
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   deprecated,
6   hopcroftkarp,
7   joblib,
8   matplotlib,
9   numpy,
10   scikit-learn,
11   scipy,
12   pytestCheckHook,
13   pythonAtLeast,
14   pythonOlder,
17 buildPythonPackage rec {
18   pname = "persim";
19   version = "0.3.7";
20   format = "setuptools";
22   disabled = pythonOlder "3.7";
24   src = fetchPypi {
25     inherit pname version;
26     hash = "sha256-dvcpj7ekbNvsc2+FSXfx4Xlt3y1pdO2n2FnKKEf032Q=";
27   };
29   propagatedBuildInputs = [
30     deprecated
31     hopcroftkarp
32     joblib
33     matplotlib
34     numpy
35     scikit-learn
36     scipy
37   ];
39   nativeCheckInputs = [ pytestCheckHook ];
41   preCheck = ''
42     # specifically needed for darwin
43     export HOME=$(mktemp -d)
44     mkdir -p $HOME/.matplotlib
45     echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
46   '';
48   pythonImportsCheck = [ "persim" ];
50   disabledTests = lib.optionals (pythonAtLeast "3.10") [
51     # AttributeError: module 'collections' has no attribute 'Iterable'
52     "test_empyt_diagram_list"
53     "test_empty_diagram_list"
54     "test_fit_diagram"
55     "test_integer_diagrams"
56     "test_lists_of_lists"
57     "test_mixed_pairs"
58     "test_multiple_diagrams"
59     "test_n_pixels"
60     # https://github.com/scikit-tda/persim/issues/67
61     "test_persistenceimager"
62     # ValueError: setting an array element with a sequence
63     "test_exact_critical_pairs"
64   ];
66   meta = with lib; {
67     description = "Distances and representations of persistence diagrams";
68     homepage = "https://persim.scikit-tda.org";
69     changelog = "https://github.com/scikit-tda/persim/releases/tag/v${version}";
70     license = licenses.mit;
71     maintainers = [ ];
72   };