Details
Description
PIP packaging test started to fail (see https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/120218/testReport/) as of setuptools 46.1.0 release.
In https://github.com/pypa/setuptools/issues/1424, they decided to don't keep the modes in package_data. In PySpark pip installation, we keep the executable scripts in package_data https://github.com/apache/spark/blob/master/python/setup.py#L199-L200, and expose their symbolic links as executable scripts.
So, the symbolic links (or copied scripts) executes the scripts copied from package_data, which didn't keep the modes:
/tmp/tmp.UmkEGNFdKF/3.6/bin/spark-submit: line 27: /tmp/tmp.UmkEGNFdKF/3.6/lib/python3.6/site-packages/pyspark/bin/spark-class: Permission denied /tmp/tmp.UmkEGNFdKF/3.6/bin/spark-submit: line 27: exec: /tmp/tmp.UmkEGNFdKF/3.6/lib/python3.6/site-packages/pyspark/bin/spark-class: cannot execute: Permission denied
The current issue is being tracked at https://github.com/pypa/setuptools/issues/2041