1{
2 lib,
3 buildPythonPackage,
4 click,
5 cloudpickle,
6 dask,
7 fetchFromGitHub,
8 jinja2,
9 locket,
10 msgpack,
11 packaging,
12 psutil,
13 pythonOlder,
14 pythonRelaxDepsHook,
15 pyyaml,
16 setuptools,
17 setuptools-scm,
18 sortedcontainers,
19 tblib,
20 toolz,
21 tornado,
22 urllib3,
23 versioneer,
24 zict,
25}:
26
27buildPythonPackage rec {
28 pname = "distributed";
29 version = "2024.5.0";
30 pyproject = true;
31
32 disabled = pythonOlder "3.9";
33
34 src = fetchFromGitHub {
35 owner = "dask";
36 repo = "distributed";
37 rev = "refs/tags/${version}";
38 hash = "sha256-9W5BpBQHw1ZXCOWiFPeIlMns/Yys1gtdwQ4Lhd7qjK8=";
39 };
40
41 postPatch = ''
42 substituteInPlace pyproject.toml \
43 --replace "versioneer[toml]==" "versioneer[toml]>=" \
44 --replace 'dynamic = ["version"]' 'version = "${version}"'
45 '';
46
47 build-system = [
48 pythonRelaxDepsHook
49 setuptools
50 setuptools-scm
51 versioneer
52 ] ++ versioneer.optional-dependencies.toml;
53
54 pythonRelaxDeps = [ "dask" ];
55
56 dependencies = [
57 click
58 cloudpickle
59 dask
60 jinja2
61 locket
62 msgpack
63 packaging
64 psutil
65 pyyaml
66 sortedcontainers
67 tblib
68 toolz
69 tornado
70 urllib3
71 zict
72 ];
73
74 # When tested random tests would fail and not repeatably
75 doCheck = false;
76
77 pythonImportsCheck = [ "distributed" ];
78
79 meta = with lib; {
80 description = "Distributed computation in Python";
81 homepage = "https://distributed.readthedocs.io/";
82 changelog = "https://github.com/dask/distributed/blob/${version}/docs/source/changelog.rst";
83 license = licenses.bsd3;
84 maintainers = with maintainers; [ teh ];
85 };
86}