3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/persim/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv
, lib
2019-07-13 01:35:53 +01:00
, buildPythonPackage
, fetchPypi
2021-04-27 04:06:02 +01:00
, deprecated
, hopcroftkarp
, joblib
2019-07-13 01:35:53 +01:00
, matplotlib
2021-04-27 04:06:02 +01:00
, numpy
, scikit-learn
2019-07-13 01:35:53 +01:00
, scipy
2021-04-27 04:06:02 +01:00
, pytestCheckHook
, pythonAtLeast
, pythonOlder
2019-07-13 01:35:53 +01:00
}:
buildPythonPackage rec {
pname = "persim";
2021-06-18 22:47:29 +01:00
version = "0.3.1";
format = "setuptools";
disabled = pythonOlder "3.7";
2019-07-13 01:35:53 +01:00
src = fetchPypi {
inherit pname version;
sha256 = "sha256-7w8KJHrc9hBOysFBF9sLJFgXEOqKjZZIFoBTlXALSXU=";
2019-07-13 01:35:53 +01:00
};
propagatedBuildInputs = [
2021-04-27 04:06:02 +01:00
deprecated
hopcroftkarp
joblib
2019-07-13 01:35:53 +01:00
matplotlib
2021-04-27 04:06:02 +01:00
numpy
scikit-learn
2019-07-13 01:35:53 +01:00
scipy
];
checkInputs = [
2021-04-27 04:06:02 +01:00
pytestCheckHook
2019-07-13 01:35:53 +01:00
];
2021-04-27 04:06:02 +01:00
preCheck = ''
2019-07-13 01:35:53 +01:00
# specifically needed for darwin
export HOME=$(mktemp -d)
mkdir -p $HOME/.matplotlib
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"
];
2019-07-13 01:35:53 +01:00
meta = with lib; {
broken = stdenv.isDarwin;
2019-07-13 01:35:53 +01:00
description = "Distances and representations of persistence diagrams";
homepage = "https://persim.scikit-tda.org";
2019-07-13 01:35:53 +01:00
license = licenses.mit;
maintainers = with maintainers; [ costrouc ];
2019-07-13 01:35:53 +01:00
};
}