1{
2 lib,
3 buildPythonPackage,
4 pythonAtLeast,
5 fetchFromGitHub,
6
7 # build-system
8 setuptools,
9
10 # propagates
11 distutils,
12 pyyaml,
13 standard-pipes,
14
15 # optionals
16 boto3,
17 botocore,
18 google-cloud-dataproc,
19 google-cloud-logging,
20 google-cloud-storage,
21 python-rapidjson,
22 simplejson,
23 ujson,
24
25 # tests
26 pyspark,
27 unittestCheckHook,
28 warcio,
29}:
30
31buildPythonPackage rec {
32 pname = "mrjob";
33 version = "0.7.4";
34 pyproject = true;
35
36 src = fetchFromGitHub {
37 owner = "Yelp";
38 repo = "mrjob";
39 tag = "v${version}";
40 hash = "sha256-Yp4yUx6tkyGB622I9y+AWK2AkIDVGKQPMM+LtB/M3uo=";
41 };
42
43 build-system = [
44 setuptools
45 ];
46
47 dependencies = [
48 distutils
49 pyyaml
50 standard-pipes
51 ];
52
53 optional-dependencies = {
54 aws = [
55 boto3
56 botocore
57 ];
58 google = [
59 google-cloud-dataproc
60 google-cloud-logging
61 google-cloud-storage
62 ];
63 rapidjson = [ python-rapidjson ];
64 simplejson = [ simplejson ];
65 ujson = [ ujson ];
66 };
67
68 doCheck = false; # failing tests
69
70 nativeCheckInputs = [
71 pyspark
72 unittestCheckHook
73 warcio
74 ]
75 ++ lib.flatten (builtins.attrValues optional-dependencies);
76
77 unittestFlagsArray = [ "-v" ];
78
79 meta = with lib; {
80 changelog = "https://github.com/Yelp/mrjob/blob/v${version}/CHANGES.txt";
81 description = "Run MapReduce jobs on Hadoop or Amazon Web Services";
82 homepage = "https://github.com/Yelp/mrjob";
83 license = licenses.asl20;
84 maintainers = [ ];
85 };
86}