nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 setuptools,
7 versioneer,
8 dask,
9 distributed,
10 grpcio,
11 skein,
12 pytestCheckHook,
13}:
14
15buildPythonPackage rec {
16 pname = "dask-yarn";
17 version = "0.9";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "dask";
22 repo = "dask-yarn";
23 tag = version;
24 hash = "sha256-/BTsxQSiVQrihrCa9DE7pueyg3aPAdjd/Dt4dpUwdtM=";
25 };
26
27 patches = [
28 (fetchpatch {
29 # https://github.com/dask/dask-yarn/pull/150
30 name = "address-deprecations-introduced-in-distributed-2021-07-0";
31 url = "https://github.com/dask/dask-yarn/pull/150/commits/459848afcdc22568905ee98622c74e4071496423.patch";
32 hash = "sha256-LS46QBdiAmsp4jQq4DdYdmmk1qzx5JZNTQUlRcRwY5k=";
33 })
34 ];
35
36 postPatch = ''
37 rm versioneer.py
38 '';
39
40 build-system = [
41 setuptools
42 versioneer
43 ];
44
45 dependencies = [
46 dask
47 distributed
48 grpcio
49 skein
50 ];
51
52 nativeCheckInputs = [ pytestCheckHook ];
53
54 preCheck = ''
55 export HOME=$TMPDIR
56 '';
57
58 pythonImportsCheck = [ "dask_yarn" ];
59
60 disabledTests = [
61 # skein.exceptions.DriverError: Failed to start java process
62 "test_basic"
63 "test_adapt"
64 "test_from_specification"
65 "test_from_application_id"
66 "test_from_current"
67 "test_basic_async"
68 "test_widget_and_html_reprs"
69 ];
70
71 meta = {
72 description = "Deploy dask on YARN clusters";
73 mainProgram = "dask-yarn";
74 longDescription = ''
75 Dask-Yarn deploys Dask on YARN clusters,
76 such as are found in traditional Hadoop installations.
77 Dask-Yarn provides an easy interface to quickly start,
78 stop, and scale Dask clusters natively from Python.
79 '';
80 homepage = "https://yarn.dask.org/";
81 license = lib.licenses.bsd3;
82 maintainers = with lib.maintainers; [ illustris ];
83 };
84}