sarutak commented on code in PR #56186:
URL: https://github.com/apache/spark/pull/56186#discussion_r3319480315


##########
dev/make-distribution.sh:
##########
@@ -294,7 +294,11 @@ mkdir "$DISTDIR/conf"
 cp "$SPARK_HOME"/conf/*.template "$DISTDIR/conf"
 cp "$SPARK_HOME/README.md" "$DISTDIR"
 cp -r "$SPARK_HOME/bin" "$DISTDIR"
-cp -r "$SPARK_HOME/python" "$DISTDIR"
+if command -v git && command -v cpio && git rev-parse --git-dir 2>/dev/null; 
then
+  git ls-files -z "$SPARK_HOME/python" | cpio -pdm "$DISTDIR"

Review Comment:
   I tried your change and I noticed:
   
   * On Linux environment, `cpio` only copies `.coveragerc` to 
`$DISTDIR/python`. `-0` option seems required, which should work with `cpio` on 
macOS.
   * If we run `make-distribution.sh` on a directory other than `$SPARK_HOME`, 
files under `python` are't copied to `$DISTDIR`.
   
   ```suggestion
     (cd "$SPARK_HOME" && git ls-files -z python | cpio -0pdm "$DISTDIR")
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to