about summary refs log tree commit diff
path: root/pkgs/development/python-modules/dask-ml/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/dask-ml/default.nix')
-rw-r--r--pkgs/development/python-modules/dask-ml/default.nix42
1 files changed, 28 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/dask-ml/default.nix b/pkgs/development/python-modules/dask-ml/default.nix
index 3cb7ed9618b15..9c19a072ee587 100644
--- a/pkgs/development/python-modules/dask-ml/default.nix
+++ b/pkgs/development/python-modules/dask-ml/default.nix
@@ -1,37 +1,47 @@
 { lib
 , buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, hatch-vcs
+, hatchling
+, setuptools-scm
 , dask
+, dask-expr
 , dask-glm
 , distributed
-, fetchPypi
 , multipledispatch
 , numba
 , numpy
 , packaging
 , pandas
-, pythonOlder
 , scikit-learn
 , scipy
-, setuptools-scm
+, pytest-mock
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "dask-ml";
-  version = "2023.3.24";
-  format = "setuptools";
+  version = "2024.4.4";
+  pyproject = true;
 
   disabled = pythonOlder "3.6";
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-lsCQ220yg2U24/Ccpk3rWZ6GRYeqjj1NLGtK9YhzMwc=";
+  src = fetchFromGitHub {
+    owner = "dask";
+    repo = "dask-ml";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-ZiBpCk3b4Tk0Hwb4uapJLEx+Nb/qHFROCnkBTNGDzoU=";
   };
 
-  nativeBuildInputs = [
+  build-system = [
+    hatch-vcs
+    hatchling
     setuptools-scm
   ];
 
-  propagatedBuildInputs = [
+  dependencies = [
+    dask-expr
     dask-glm
     distributed
     multipledispatch
@@ -44,9 +54,6 @@ buildPythonPackage rec {
   ] ++ dask.optional-dependencies.array
     ++ dask.optional-dependencies.dataframe;
 
-  # has non-standard build from source, and pypi doesn't include tests
-  doCheck = false;
-
   pythonImportsCheck = [
     "dask_ml"
     "dask_ml.naive_bayes"
@@ -54,10 +61,17 @@ buildPythonPackage rec {
     "dask_ml.utils"
   ];
 
+  nativeCheckInputs = [
+    pytest-mock
+    pytestCheckHook
+  ];
+
+  __darwinAllowLocalNetworking = true;
+
   meta = with lib; {
     description = "Scalable Machine Learn with Dask";
     homepage = "https://github.com/dask/dask-ml";
     license = licenses.bsd3;
-    maintainers = with maintainers; [ ];
+    maintainers = with maintainers; [ GaetanLepage ];
   };
 }