2021-10-17 09:34:42 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, py4j
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyspark";
|
2021-10-17 09:34:42 +00:00
|
|
|
version = "3.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-17 09:34:42 +00:00
|
|
|
sha256 = "bfea06179edbfb4bc76a0f470bd3c38e12f00e1023e3ad0373558d07cff102ab";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# pypandoc is broken with pandoc2, so we just lose docs.
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s/'pypandoc'//" setup.py
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace py4j==0.10.9.2 'py4j>=0.10.9,<0.11'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
py4j
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
# Tests assume running spark instance
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyspark"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-10-17 09:34:42 +00:00
|
|
|
description = "Python bindings for Apache Spark";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/apache/spark/tree/master/python";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.shlevy ];
|
|
|
|
};
|
|
|
|
}
|