about summary refs log tree commit diff
path: root/pkgs/development/python-modules/scikit-learn/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/scikit-learn/default.nix')
-rw-r--r--pkgs/development/python-modules/scikit-learn/default.nix24
1 files changed, 12 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/scikit-learn/default.nix b/pkgs/development/python-modules/scikit-learn/default.nix
index 591df46640db0..717a732327f72 100644
--- a/pkgs/development/python-modules/scikit-learn/default.nix
+++ b/pkgs/development/python-modules/scikit-learn/default.nix
@@ -7,16 +7,14 @@
   # build-system
   cython,
   gfortran,
+  meson-python,
   numpy,
   scipy,
-  setuptools,
-  wheel,
 
   # native dependencies
   glibcLocales,
   llvmPackages,
   pytestCheckHook,
-  pythonRelaxDepsHook,
   pytest-xdist,
   pillow,
   joblib,
@@ -26,20 +24,24 @@
 
 buildPythonPackage rec {
   pname = "scikit-learn";
-  version = "1.4.2";
+  version = "1.5.0";
   pyproject = true;
 
   disabled = pythonOlder "3.9";
 
   src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-2qHEcdlbrQgMbkS0lGyTkKSEKtwwglcsIOT4iE456Vk=";
+    pname = "scikit_learn";
+    inherit version;
+    hash = "sha256-eJ49sBx1DtbUlvott9UGN4V7RR5XvK6GO/9wfBJHvvc=";
   };
 
-  # Avoid build-system requirements causing failure
-  prePatch = ''
+  postPatch = ''
     substituteInPlace pyproject.toml \
-      --replace-fail "numpy==2.0.0rc1" "numpy"
+      --replace-fail "numpy>=2.0.0rc2" "numpy"
+
+    substituteInPlace meson.build --replace-fail \
+      "run_command('sklearn/_build_utils/version.py', check: true).stdout().strip()," \
+      "'${version}',"
   '';
 
   buildInputs = [
@@ -50,15 +52,13 @@ buildPythonPackage rec {
 
   nativeBuildInputs = [
     gfortran
-    pythonRelaxDepsHook
   ];
 
   build-system = [
     cython
+    meson-python
     numpy
     scipy
-    setuptools
-    wheel
   ];
 
   dependencies = [