mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
Merge pull request #322826 from taranarmo/pyspark-fix-find-spark-home-script
pythonPackages.pyspark: fix calling wrapped python script
This commit is contained in:
commit
6edd5cc7bd
@ -29,6 +29,17 @@ buildPythonPackage rec {
|
||||
--replace py4j== 'py4j>='
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# find_python_home.py has been wrapped as a shell script
|
||||
substituteInPlace $out/bin/find-spark-home \
|
||||
--replace 'export SPARK_HOME=$($PYSPARK_DRIVER_PYTHON "$FIND_SPARK_HOME_PYTHON_SCRIPT")' \
|
||||
'export SPARK_HOME=$("$FIND_SPARK_HOME_PYTHON_SCRIPT")'
|
||||
# patch PYTHONPATH in pyspark so that it properly looks at SPARK_HOME
|
||||
substituteInPlace $out/bin/pyspark \
|
||||
--replace 'export PYTHONPATH="''${SPARK_HOME}/python/:$PYTHONPATH"' \
|
||||
'export PYTHONPATH="''${SPARK_HOME}/..:''${SPARK_HOME}/python/:$PYTHONPATH"'
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ py4j ];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
|
Loading…
Reference in New Issue
Block a user