HyukjinKwon opened a new pull request, #619:
URL: https://github.com/apache/spark-connect-rust/pull/619

   ### What changes were proposed in this pull request?
   
   This PR adds `LICENSE-binary` and `NOTICE-binary` for the Rust dependencies 
that the wheels statically link, following ASF's guidance for binary 
distributions.
   
   - `scripts/gen_binary_licenses.py` writes both files from `cargo metadata 
--locked`. It follows the normal (non-dev, non-build) dependency edges of 
`pyspark-rs` for all platforms, and excludes the workspace's own crates and 
proc-macro crates, which are not linked. That gives 171 components.
   - 128 components offer Apache-2.0 as an option, for example `MIT OR 
Apache-2.0`. They are listed with their license expression under Apache-2.0.
   - The other 43 are listed under their expression. Their own license files 
are reproduced verbatim after the summary, so their copyright notices travel 
with them: MIT, BSD-2/3-Clause, ISC, Unlicense, Unicode-3.0, and the 
`Apache-2.0 AND ...` forms. tonic-prost 0.14.6 ships no license file, so the 
generator uses tonic 0.14.6's (MIT; same release, same repository) through an 
explicit fallback.
   - `NOTICE-binary` is this project's NOTICE followed by the NOTICE of the 
bundled Apache-2.0 crates that have one: the arrow crates' NOTICE, shared by 13 
crates.
   - `--check` exits 1 when the files are stale, and lint.yml runs it.
   - maturin declares `LICENSE-binary` and `NOTICE-binary` as `License-File` 
and puts them in the wheel's `dist-info/licenses/`. The sdist now includes both 
too. Without that, the sdist declared files it did not contain, which PyPI 
rejects.
   
   No linked component has a GPL, LGPL, AGPL, MPL, EPL or CDDL license as a 
required term. The only LGPL is an unused alternative of r-efi (`MIT OR 
Apache-2.0 OR LGPL-2.1-or-later`), so the generator doesn't reproduce LGPL 
text; doing so would suggest that LGPL code is bundled.
   
   ### Why are the changes needed?
   
   The wheels link 171 third-party crates, but their license files cover only 
the repository's own third-party code. #609 deferred `LICENSE-binary`, and a 
post-merge review flagged it.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No code change. The wheels and the sdist carry two more license files.
   
   ### How was this patch tested?
   
   - `python3 -m unittest scripts/tests/test_gen_binary_licenses.py`: 7 tests 
pass. They cover the expression parser, the Apache election, the proc-macro and 
dev-dependency exclusion, the verbatim texts, the NOTICE selection, and 
staleness after an edit, a deletion and a missing file.
   - `python3 scripts/gen_binary_licenses.py --check` passes on the tree. After 
the line `tokio 1.52.3` is removed from `LICENSE-binary`, it prints "stale: 
LICENSE-binary" and exits 1.
   - A wheel built locally with maturin (macOS arm64) has both files under 
`dist-info/licenses/`, identical to the repository's. Every `License-File` the 
sdist declares is in the tarball.
   - `cargo fmt`, the stub audit, ruff, and the cargo lib and `--no-run` gates 
pass.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5.5
   
   This pull request and its description were written by Isaac.
   


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