about summary refs log tree commit diff
path: root/pkgs/development/python-modules/hdbscan
diff options
context:
space:
mode:
authorRobert T. McGibbon <rmcgibbo@gmail.com>2021-03-23 18:30:55 -0400
committerRobert T. McGibbon <rmcgibbo@gmail.com>2021-03-24 11:50:13 -0400
commit877c07041509f4b4ff9ec480e85188cb1766371c (patch)
treefce6ebafbe54506151b97eb6f22ee5dcb8b5e2fa /pkgs/development/python-modules/hdbscan
parent7865db274bffa497feef0c07aa7d7ace86734561 (diff)
python3Packages.hdbscan: unbreak
Diffstat (limited to 'pkgs/development/python-modules/hdbscan')
-rw-r--r--pkgs/development/python-modules/hdbscan/default.nix18
1 files changed, 15 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/hdbscan/default.nix b/pkgs/development/python-modules/hdbscan/default.nix
index 6e381794cff58..d2590d14955cd 100644
--- a/pkgs/development/python-modules/hdbscan/default.nix
+++ b/pkgs/development/python-modules/hdbscan/default.nix
@@ -1,8 +1,9 @@
 { lib
 , buildPythonPackage
+, fetchpatch
 , cython
 , numpy
-, nose
+, pytestCheckHook
 , scipy
 , scikitlearn
 , fetchPypi
@@ -18,11 +19,22 @@ buildPythonPackage rec {
     inherit pname version;
     sha256 = "e3a418d0d36874f7b6a1bf0b7461f3857fc13a525fd48ba34caed2fe8973aa26";
   };
-
-  checkInputs = [ nose ];
+  patches = [
+    # This patch fixes compatibility with numpy 1.20. It will be in the next release
+    # after 0.8.27
+    (fetchpatch {
+      url = "https://github.com/scikit-learn-contrib/hdbscan/commit/5b67a4fba39c5aebe8187a6a418da677f89a63e0.patch";
+      sha256 = "07d7jdwk0b8kgaqkifd529sarji01j1jiih7cfccc5kxmlb5py9h";
+    })
+  ];
 
   nativeBuildInputs = [ cython ];
   propagatedBuildInputs = [ numpy scipy scikitlearn joblib six ];
+  preCheck = ''
+    cd hdbscan/tests
+    rm __init__.py
+  '';
+  checkInputs = [ pytestCheckHook ];
 
   meta = with lib; {
     description = "Hierarchical Density-Based Spatial Clustering of Applications with Noise, a clustering algorithm with a scikit-learn compatible API";