nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, bokeh
4, buildPythonPackage
5, cloudpickle
6, distributed
7, fetchFromGitHub
8, fetchpatch
9, fsspec
10, jinja2
11, numpy
12, packaging
13, pandas
14, partd
15, pytest-rerunfailures
16, pytest-xdist
17, pytestCheckHook
18, pythonOlder
19, pyyaml
20, toolz
21}:
22
23buildPythonPackage rec {
24 pname = "dask";
25 version = "2022.02.1";
26 format = "setuptools";
27
28 disabled = pythonOlder "3.7";
29
30 src = fetchFromGitHub {
31 owner = "dask";
32 repo = pname;
33 rev = version;
34 hash = "sha256-A8ktvfpow/QKAEEt9SUnkTqYFJCrV1mgnuDIP3gdyrE=";
35 };
36
37 propagatedBuildInputs = [
38 cloudpickle
39 fsspec
40 packaging
41 partd
42 pyyaml
43 toolz
44 pandas
45 jinja2
46 bokeh
47 numpy
48 ];
49
50 doCheck = true;
51
52 checkInputs = [
53 pytestCheckHook
54 pytest-rerunfailures
55 pytest-xdist
56 ];
57
58 dontUseSetuptoolsCheck = true;
59
60 postPatch = ''
61 # versioneer hack to set version of github package
62 echo "def get_versions(): return {'dirty': False, 'error': None, 'full-revisionid': None, 'version': '${version}'}" > dask/_version.py
63
64 substituteInPlace setup.py \
65 --replace "version=versioneer.get_version()," "version='${version}'," \
66 --replace "cmdclass=versioneer.get_cmdclass()," ""
67 '';
68
69 pytestFlagsArray = [
70 # rerun failed tests up to three times
71 "--reruns 3"
72 # don't run tests that require network access
73 "-m 'not network'"
74 ];
75
76 disabledTests = lib.optionals stdenv.isDarwin [
77 # this test requires features of python3Packages.psutil that are
78 # blocked in sandboxed-builds
79 "test_auto_blocksize_csv"
80 ] ++ [
81 # A deprecation warning from newer sqlalchemy versions makes these tests
82 # to fail https://github.com/dask/dask/issues/7406
83 "test_sql"
84 # Test interrupt fails intermittently https://github.com/dask/dask/issues/2192
85 "test_interrupt"
86 ];
87
88 __darwinAllowLocalNetworking = true;
89
90 pythonImportsCheck = [
91 "dask"
92 "dask.array"
93 "dask.bag"
94 "dask.bytes"
95 "dask.dataframe"
96 "dask.dataframe.io"
97 "dask.dataframe.tseries"
98 "dask.diagnostics"
99 ];
100
101 passthru.optional-dependencies = {
102 complete = [ distributed ];
103 };
104
105 meta = with lib; {
106 description = "Minimal task scheduling abstraction";
107 homepage = "https://dask.org/";
108 changelog = "https://docs.dask.org/en/latest/changelog.html";
109 license = licenses.bsd3;
110 maintainers = with maintainers; [ fridh ];
111 };
112}