python310Packages.ripser: fix build against c++, use pytestCheckHook

main
Sandro Jäckel 2 years ago
parent 09450ad530
commit 9d99081d56
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
  1. 18
      pkgs/development/python-modules/ripser/default.nix

@ -1,5 +1,6 @@
{ lib
, buildPythonPackage
, fetchpatch
, fetchPypi
, pythonOlder
, cython
@ -7,7 +8,7 @@
, scipy
, scikit-learn
, persim
, pytest
, pytestCheckHook
}:
buildPythonPackage rec {
@ -20,8 +21,11 @@ buildPythonPackage rec {
sha256 = "335112a0f94532ccbe686db7826ee8d0714b32f65891abf92c0a02f3cb0fc5fd";
};
checkInputs = [
pytest
patches = [
(fetchpatch {
url = "https://github.com/scikit-tda/ripser.py/commit/4baa248994cee9a65d710fac91809bad8ed4e5f1.patch";
sha256 = "sha256-J/nxMOGOUiBueojJrUlAaXwktHDploYG/XL8/siF2kY=";
})
];
propagatedBuildInputs = [
@ -32,13 +36,15 @@ buildPythonPackage rec {
persim
];
checkPhase = ''
checkInputs = [
pytestCheckHook
];
preCheck = ''
# specifically needed for darwin
export HOME=$(mktemp -d)
mkdir -p $HOME/.matplotlib
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
pytest
'';
meta = with lib; {

Loading…
Cancel
Save