1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytest
5, pytest-repeat
6, pytest-timeout
7, mock
8, joblib
9, click
10, cloudpickle
11, dask
12, msgpack
13, psutil
14, six
15, sortedcontainers
16, tblib
17, toolz
18, tornado
19, zict
20, pyyaml
21, isPy3k
22, futures
23, singledispatch
24, mpi4py
25, bokeh
26}:
27
28buildPythonPackage rec {
29 pname = "distributed";
30 version = "2.23.0";
31
32 # get full repository need conftest.py to run tests
33 src = fetchPypi {
34 inherit pname version;
35 sha256 = "469e505fd7ce75f600188bdb69a95641899d5b372f74246c8f308376b6929e9c";
36 };
37
38 checkInputs = [ pytest pytest-repeat pytest-timeout mock joblib ];
39 propagatedBuildInputs = [
40 click cloudpickle dask msgpack psutil six
41 sortedcontainers tblib toolz tornado zict pyyaml mpi4py bokeh
42 ] ++ lib.optionals (!isPy3k) [ futures singledispatch ];
43
44 # tests take about 10-15 minutes
45 # ignore 5 cli tests out of 1000 total tests that fail due to subprocesses
46 # these tests are not critical to the library (only the cli)
47 checkPhase = ''
48 py.test distributed -m "not avoid-travis" -r s --timeout-method=thread --timeout=0 --durations=20 --ignore="distributed/cli/tests"
49 '';
50
51 # when tested random tests would fail and not repeatably
52 doCheck = false;
53
54 meta = {
55 description = "Distributed computation in Python.";
56 homepage = "https://distributed.readthedocs.io/en/latest/";
57 license = lib.licenses.bsd3;
58 platforms = lib.platforms.x86; # fails on aarch64
59 maintainers = with lib.maintainers; [ teh costrouc ];
60 };
61}