summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/mrjob/default.nix
blob: 214dfeff8b554e4ea1ad930b92c08b12ae44bf73 (plain)
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
80
81
82
83
84
85
86
{
  lib,
  buildPythonPackage,
  pythonAtLeast,
  fetchFromGitHub,

  # build-system
  setuptools,

  # propagates
  distutils,
  pyyaml,
  standard-pipes,

  # optionals
  boto3,
  botocore,
  google-cloud-dataproc,
  google-cloud-logging,
  google-cloud-storage,
  python-rapidjson,
  simplejson,
  ujson,

  # tests
  pyspark,
  unittestCheckHook,
  warcio,
}:

buildPythonPackage rec {
  pname = "mrjob";
  version = "0.7.4";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Yelp";
    repo = "mrjob";
    tag = "v${version}";
    hash = "sha256-Yp4yUx6tkyGB622I9y+AWK2AkIDVGKQPMM+LtB/M3uo=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    distutils
    pyyaml
    standard-pipes
  ];

  optional-dependencies = {
    aws = [
      boto3
      botocore
    ];
    google = [
      google-cloud-dataproc
      google-cloud-logging
      google-cloud-storage
    ];
    rapidjson = [ python-rapidjson ];
    simplejson = [ simplejson ];
    ujson = [ ujson ];
  };

  doCheck = false; # failing tests

  nativeCheckInputs = [
    pyspark
    unittestCheckHook
    warcio
  ]
  ++ lib.concatAttrValues optional-dependencies;

  unittestFlagsArray = [ "-v" ];

  meta = {
    changelog = "https://github.com/Yelp/mrjob/blob/v${version}/CHANGES.txt";
    description = "Run MapReduce jobs on Hadoop or Amazon Web Services";
    homepage = "https://github.com/Yelp/mrjob";
    license = lib.licenses.asl20;
    maintainers = [ ];
  };
}