From e72d2b671678edf1a96cf46746a285a5e8a96544 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Fri, 12 Jul 2019 20:35:14 -0400 Subject: [PATCH] pythonPackages.ripser: init at 0.3.2 --- .../python-modules/ripser/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/ripser/default.nix diff --git a/pkgs/development/python-modules/ripser/default.nix b/pkgs/development/python-modules/ripser/default.nix new file mode 100644 index 000000000000..7a0ae68993a0 --- /dev/null +++ b/pkgs/development/python-modules/ripser/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchPypi +, cython +, numpy +, scipy +, scikitlearn +, persim +, pytest +}: + +buildPythonPackage rec { + pname = "ripser"; + version = "0.3.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "ff9f50fba911f0e9212077b78014f83e30c97526194dd6bd1df3d81896e6cb58"; + }; + + checkInputs = [ + pytest + ]; + + propagatedBuildInputs = [ + cython + numpy + scipy + scikitlearn + persim + ]; + + checkPhase = '' + # specifically needed for darwin + export HOME=$(mktemp -d) + mkdir -p $HOME/.matplotlib + echo "backend: ps" > $HOME/.matplotlib/matplotlibrc + + pytest + ''; + + meta = with lib; { + description = "A Lean Persistent Homology Library for Python"; + homepage = https://ripser.scikit-tda.org; + license = licenses.mit; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a18e6c66ca7d..f0ae1f635996 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4314,6 +4314,8 @@ in { python2 = python; })); + ripser = callPackage ../development/python-modules/ripser { }; + rjsmin = callPackage ../development/python-modules/rjsmin { }; pysolr = callPackage ../development/python-modules/pysolr { };