@@ -1,6 +1,7 @@
11{ lib
22, bokeh
33, buildPythonPackage
4+, fetchpatch
45, fetchFromGitHub
56, fsspec
67, pytestCheckHook
@@ -42,7 +43,7 @@ buildPythonPackage rec {
4243 distributed
4344 ];
4445
45− doCheck = false;
46+ doCheck = true;
4647
4748 checkInputs = [
4849 pytestCheckHook
@@ -52,6 +53,16 @@ buildPythonPackage rec {
5253
5354 dontUseSetuptoolsCheck = true;
5455
56+ patches = [
57+ # dask dataframe cannot be imported in sandboxed builds
58+ # See https://github.com/dask/dask/pull/7601
59+ (fetchpatch {
60+ url = "https://github.com/dask/dask/commit/9ce5b0d258cecb3ef38fd844135ad1f7ac3cea5f.patch";
61+ sha256 = "sha256-1EVRYwAdTSEEH9jp+UOnrijzezZN3iYR6q6ieYJM3kY=";
62+ name = "fix-dask-dataframe-imports-in-sandbox.patch";
63+ })
64+ ];
65+
5566 postPatch = ''
5667 # versioneer hack to set version of github package
5768 echo "def get_versions(): return {'dirty': False, 'error': None, 'full-revisionid': None, 'version': '${version}'}" > dask/_version.py
@@ -66,8 +77,13 @@ buildPythonPackage rec {
6677 disabledTests = [
6778 "test_annotation_pack_unpack"
6879 "test_annotations_blockwise_unpack"
80+ # this test requires features of python3Packages.psutil that are
81+ # blocked in sandboxed-builds
82+ "test_auto_blocksize_csv"
6983 ];
7084
85+ pythonImportsCheck = [ "dask.dataframe" "dask" "dask.array" ];
86+
7187 meta = with lib; {
7288 description = "Minimal task scheduling abstraction";
7389 homepage = "https://dask.org/";