blob: a5e35e698c99fb08be91d634526d0951eb7f08b1 (
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
|
{
lib,
buildPythonPackage,
fetchPypi,
numpy,
pandas,
py4j,
pyarrow,
pythonOlder,
}:
buildPythonPackage rec {
pname = "pyspark";
version = "3.5.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-3WVp5Uc2Xq3E+Ie/V/FT5NWCpoxLSQ3kddVbmYFmSRA=";
};
# pypandoc is broken with pandoc2, so we just lose docs.
postPatch = ''
sed -i "s/'pypandoc'//" setup.py
substituteInPlace setup.py \
--replace py4j== 'py4j>='
'';
propagatedBuildInputs = [ py4j ];
passthru.optional-dependencies = {
ml = [ numpy ];
mllib = [ numpy ];
sql = [
numpy
pandas
pyarrow
];
};
# Tests assume running spark instance
doCheck = false;
pythonImportsCheck = [ "pyspark" ];
meta = with lib; {
description = "Python bindings for Apache Spark";
homepage = "https://github.com/apache/spark/tree/master/python";
sourceProvenance = with sourceTypes; [
fromSource
binaryBytecode
];
license = licenses.asl20;
maintainers = with maintainers; [ shlevy ];
};
}
|