1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8 setuptools-scm,
9 versioneer,
10
11 # dependencies
12 click,
13 cloudpickle,
14 dask,
15 jinja2,
16 locket,
17 msgpack,
18 packaging,
19 psutil,
20 pyyaml,
21 sortedcontainers,
22 tblib,
23 toolz,
24 tornado,
25 urllib3,
26 zict,
27}:
28
29buildPythonPackage rec {
30 pname = "distributed";
31 version = "2025.7.0";
32 pyproject = true;
33
34 src = fetchFromGitHub {
35 owner = "dask";
36 repo = "distributed";
37 tag = version;
38 hash = "sha256-np4hCamNTbnmLdfjFeHsxEEm9XI1O0kOczDe1YjSziw=";
39 };
40
41 postPatch = ''
42 substituteInPlace pyproject.toml \
43 --replace-fail "versioneer[toml]==" "versioneer[toml]>=" \
44 --replace-fail 'dynamic = ["version"]' 'version = "${version}"'
45 '';
46
47 build-system = [
48 setuptools
49 setuptools-scm
50 versioneer
51 ]
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 = {
80 description = "Distributed computation in Python";
81 homepage = "https://distributed.readthedocs.io/";
82 changelog = "https://github.com/dask/distributed/releases/tag/${src.tag}";
83 license = lib.licenses.bsd3;
84 maintainers = with lib.maintainers; [ teh ];
85 };
86}