mesos/spark — pull request #742 by JoshRosen (2013-07-29 02:39:17+00:00)
Title: PySpark should set worker PYTHONPATH from SPARK_HOME instead of inheriting it from the master (SPARK-832)

This fixes [SPARK-832](https://spark-project.atlassian.net/browse/SPARK-832), an issue where the workers inherited the master's PYTHONPATH instead of setting it from SPARK_HOME. This prevented PySpark from working in environments where the master and workers used different SPARK_HOME paths.

I could have fixed this by prepending `$SPARK_HOME/python/:` to the workers' PYTHONPATH while retaining the PYTHONPATH inheritance from the master, but the inheritance is confusing and I don't see a compelling reason to keep it (PySpark PYTHONPATH customization can still be performed by in spark-env.sh, though).

Please merge this into the master branch, too.