1{ buildPythonPackage, fetchPypi, stdenv, py4j }:
2
3buildPythonPackage rec {
4 pname = "pyspark";
5 version = "2.4.3";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "6839718ce9f779e81153d8a14a843a5c4b2d5e6574f3c916aec241022d717cb2";
10 };
11
12 # pypandoc is broken with pandoc2, so we just lose docs.
13 postPatch = ''
14 sed -i "s/'pypandoc'//" setup.py
15
16 # Current release works fine with py4j 0.10.8.1
17 substituteInPlace setup.py --replace py4j==0.10.7 'py4j>=0.10.7,<0.11'
18 '';
19
20 propagatedBuildInputs = [ py4j ];
21
22 # Tests assume running spark...
23 doCheck = false;
24
25 meta = with stdenv.lib; {
26 description = "Apache Spark";
27 homepage = https://github.com/apache/spark/tree/master/python;
28 license = licenses.asl20;
29 maintainers = [ maintainers.shlevy ];
30 };
31}