about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/dask-yarn/default.nix
blob: acea511b249526221ceadf840abc1e4e611f1266 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{ lib
, stdenv
, buildPythonPackage
, dask
, distributed
, fetchFromGitHub
, fetchpatch
, grpcio
, pytestCheckHook
, pythonOlder
, skein
}:

buildPythonPackage rec {
  pname = "dask-yarn";
  version = "0.9";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "dask";
    repo = "dask-yarn";
    rev = "refs/tags/${version}";
    hash = "sha256-/BTsxQSiVQrihrCa9DE7pueyg3aPAdjd/Dt4dpUwdtM=";
  };

  patches = [
    (fetchpatch {  # https://github.com/dask/dask-yarn/pull/150
      name = "address-deprecations-introduced-in-distributed-2021-07-0";
      url = "https://github.com/dask/dask-yarn/pull/150/commits/459848afcdc22568905ee98622c74e4071496423.patch";
      hash = "sha256-LS46QBdiAmsp4jQq4DdYdmmk1qzx5JZNTQUlRcRwY5k=";
    })
  ];

  propagatedBuildInputs = [
    distributed
    dask
    grpcio
    skein
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  preCheck = ''
    export HOME=$TMPDIR
  '';

  pythonImportsCheck = [
    "dask_yarn"
  ];

  disabledTests = [
    # skein.exceptions.DriverError: Failed to start java process
    "test_basic"
    "test_adapt"
    "test_from_specification"
    "test_from_application_id"
    "test_from_current"
    "test_basic_async"
    "test_widget_and_html_reprs"
  ];

  meta = with lib; {
    description = "Deploy dask on YARN clusters";
    mainProgram = "dask-yarn";
    longDescription = ''Dask-Yarn deploys Dask on YARN clusters,
      such as are found in traditional Hadoop installations.
      Dask-Yarn provides an easy interface to quickly start,
      stop, and scale Dask clusters natively from Python.
    '';
    homepage = "https://yarn.dask.org/";
    license = licenses.bsd3;
    maintainers = with maintainers; [ illustris ];
    broken = stdenv.isDarwin;
  };
}