about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-04-24 07:21:19 +0200
committerGitHub <noreply@github.com>2021-04-24 07:21:19 +0200
commit292b2d389effb92c9e7e0f626895c15b7275117b (patch)
tree4cb6013fe6fae519df7af02c4f673ffbb0d62e06 /pkgs/development
parent3a6dd829891d8e6c56ad616be92e7a9fd1030ef1 (diff)
parentceeaf2d0669cc5a4d86e6313cc0fdb6774659884 (diff)
Merge pull request #120310 from nbren12/fix-dask-in-sandbox
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/dask/default.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/dask/default.nix b/pkgs/development/python-modules/dask/default.nix
index 8f3e4d08583b2..13c03a1f7968e 100644
--- a/pkgs/development/python-modules/dask/default.nix
+++ b/pkgs/development/python-modules/dask/default.nix
@@ -1,6 +1,7 @@
 { lib
 , bokeh
 , buildPythonPackage
+, fetchpatch
 , fetchFromGitHub
 , fsspec
 , pytestCheckHook
@@ -42,7 +43,7 @@ buildPythonPackage rec {
     distributed
   ];
 
-  doCheck = false;
+  doCheck = true;
 
   checkInputs = [
     pytestCheckHook
@@ -52,6 +53,16 @@ buildPythonPackage rec {
 
   dontUseSetuptoolsCheck = true;
 
+  patches = [
+    # dask dataframe cannot be imported in sandboxed builds
+    # See https://github.com/dask/dask/pull/7601
+    (fetchpatch {
+      url = "https://github.com/dask/dask/commit/9ce5b0d258cecb3ef38fd844135ad1f7ac3cea5f.patch";
+      sha256 = "sha256-1EVRYwAdTSEEH9jp+UOnrijzezZN3iYR6q6ieYJM3kY=";
+      name = "fix-dask-dataframe-imports-in-sandbox.patch";
+    })
+  ];
+
   postPatch = ''
     # versioneer hack to set version of github package
     echo "def get_versions(): return {'dirty': False, 'error': None, 'full-revisionid': None, 'version': '${version}'}" > dask/_version.py
@@ -66,8 +77,13 @@ buildPythonPackage rec {
   disabledTests = [
     "test_annotation_pack_unpack"
     "test_annotations_blockwise_unpack"
+    # this test requires features of python3Packages.psutil that are
+    # blocked in sandboxed-builds
+    "test_auto_blocksize_csv"
   ];
 
+  pythonImportsCheck = [ "dask.dataframe" "dask" "dask.array" ];
+
   meta = with lib; {
     description = "Minimal task scheduling abstraction";
     homepage = "https://dask.org/";