cloud-fan commented on code in PR #56453:
URL: https://github.com/apache/spark/pull/56453#discussion_r3398709760


##########
python/packaging/classic/setup.py:
##########
@@ -104,7 +104,10 @@
 SCRIPTS_PATH = os.path.join(SPARK_HOME, "bin")
 USER_SCRIPTS_PATH = os.path.join(SPARK_HOME, "sbin")
 DATA_PATH = os.path.join(SPARK_HOME, "data")
-LICENSES_PATH = os.path.join(SPARK_HOME, "licenses")
+# The classic PySpark package bundles the assembly jars, so it ships the binary
+# license texts (licenses-binary), which enumerate those jars' licenses, 
mirroring
+# the binary distribution. The connect/client packages bundle no jars.
+LICENSES_PATH = os.path.join(SPARK_HOME, "licenses-binary")

Review Comment:
   This breaks the RELEASE build mode: `in_spark` is also true when building 
from a binary release dist (`../RELEASE`, line 124), where the binary license 
texts live in `licenses/` and `licenses-binary/` doesn't exist — the symlink 
farm then dangles, and the sdist silently ships an empty `deps/licenses` on 
POSIX (verified: `os.symlink` succeeds on a missing target and sdist 
file-finding yields nothing under it); the Windows `copytree` fallback crashes 
instead. Pre-PR this mode shipped the texts (`licenses/` exists in both modes). 
Mirroring make-distribution.sh's own missing-file fallback (line 285) keeps 
that mode working:
   ```suggestion
   LICENSES_PATH = os.path.join(SPARK_HOME, "licenses-binary")
   if not os.path.isdir(LICENSES_PATH):
       # In a binary release dist (the RELEASE mode below), the binary license 
texts
       # were already copied to licenses/ (see dev/make-distribution.sh).
       LICENSES_PATH = os.path.join(SPARK_HOME, "licenses")
   ```



-- 
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