about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorCorinna Raab <cor.rizzle@protonmail.com>2024-04-11 00:12:00 +0200
committerCorinna Raab <cor.rizzle@protonmail.com>2024-04-11 00:12:00 +0200
commit24d031bfa207df12b9fca6ff14838bc25fb5a531 (patch)
treeca3e73303e7dd906b8fef154e8102cf8bcf654a1 /pkgs/development
parent4e2ce36aab7183f1d800cd5417cfa3d4d6c72d93 (diff)
python312Packages.sparse: fix build
and other minor changes
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/sparse/default.nix23
1 files changed, 20 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/sparse/default.nix b/pkgs/development/python-modules/sparse/default.nix
index 1ecf340e975e6..0c81e34350989 100644
--- a/pkgs/development/python-modules/sparse/default.nix
+++ b/pkgs/development/python-modules/sparse/default.nix
@@ -6,22 +6,34 @@
 , numpy
 , pytestCheckHook
 , pythonOlder
+, setuptools
+, setuptools-scm
 , scipy
 }:
 
 buildPythonPackage rec {
   pname = "sparse";
   version = "0.15.1";
-  format = "setuptools";
+  pyproject = true;
 
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.8";
 
   src = fetchPypi {
     inherit pname version;
     hash = "sha256-lzrcuIqNuOPYBHlTMx4m0/ZKVlf5tGprhZxHZjw+75k=";
   };
 
-  propagatedBuildInputs = [
+  postPatch = ''
+    substituteInPlace pytest.ini \
+      --replace-fail "--cov-report term-missing --cov-report html --cov-report=xml --cov-report=term --cov sparse --cov-config .coveragerc --junitxml=junit/test-results.xml" ""
+  '';
+
+  build-system = [
+    setuptools
+    setuptools-scm
+  ];
+
+  dependencies = [
     numba
     numpy
     scipy
@@ -36,6 +48,11 @@ buildPythonPackage rec {
     "sparse"
   ];
 
+  pytestFlagsArray = [
+    "-W"
+    "ignore::pytest.PytestRemovedIn8Warning"
+  ];
+
   meta = with lib; {
     description = "Sparse n-dimensional arrays computations";
     homepage = "https://sparse.pydata.org/";